/* =========================
   ROOT COLORS (VERY IMPORTANT)
========================= */
:root {
    --primary-color: #FB7A24; /* Used for both header & footer */
    --primary-hover: #e86c1f;
}

/* =========================
   CSS RESET & BASE STYLES
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* =========================
   GENERAL LAYOUT
========================= */
.container {
    width: 90%;
    margin: auto;
}

/* =========================
   HEADER
========================= */
.main-header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================
   LOGO
========================= */
.logo a {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
}

.logo a:hover {
    opacity: 0.9;
}

.logo-img {
    width: 50px;
    margin-right: 10px;
}

/* =========================
   NAVIGATION
========================= */
.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: 0.3s;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* =========================
   CART
========================= */
.cart-link {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    position: relative;
}

.cart-count {
    background-color: #e74c3c;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    position: absolute;
    top: -8px;
    right: -8px;
    animation: pulse 2s infinite;
}

/* =========================
   MAIN CONTENT
========================= */
.content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

/* =========================
   SEARCH BAR
========================= */
.search-bar {
    display: flex;
    margin: 20px auto;
    max-width: 700px;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px 0 0 6px;
    font-size: 15px;
}

.search-bar button {
    padding: 12px 18px;
    background: var(--primary-color);
    border: none;
    color: #fff;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.search-bar button:hover {
    background: var(--primary-hover);
}

/* =========================
   PRODUCTS GRID
========================= */
.products {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 books per row */
    gap: 20px;
}

/* =========================
   PRODUCT CARD
========================= */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 6px;
}

.card h4 {
    margin: 8px 0 4px;
    font-size: 14px;
}

.card p {
    margin: 2px 0;
    font-size: 12px;
    color: #555;
}

/* TYPE + PRICE */
.type-row {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 12px;
    flex-wrap: wrap;
}

.type {
    font-weight: bold;
}

.price {
    color: green;
    font-weight: bold;
}

/* =========================
   BUTTONS
========================= */
button,
.btn {
    background: var(--primary-color);
    border: none;
    padding: 6px 10px;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

button:hover,
.btn:hover {
    background: var(--primary-hover);
}

/* INPUT */
input[type="number"] {
    width: 45px;
    padding: 4px;
}

/* =========================
   FOOTER (MATCHES HEADER COLOR)
========================= */
.main-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 35px 20px;
    text-align: center;
    margin-top: 60px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.footer-container p {
    margin: 10px 0;
    font-size: 14px;
}

.footer-container a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-container a:hover {
    opacity: 0.85;
}

/* =========================
   SOCIAL ICONS
========================= */
.social-icons {
    list-style: none;
    padding: 0;
    margin-top: 18px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.social-icons li a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    transition: 0.25s;
}

.social-icons .facebook { background: #3b5998; }
.social-icons .whatsapp { background: #25d366; }
.social-icons .instagram { background: #e4405f; }
.social-icons .tiktok { background: #000; }

.social-icons li a:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

/* =========================
   ANIMATIONS
========================= */
@keyframes pulse {
    0% { transform: scale(1); }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* =========================
   FLOATING WHATSAPP
========================= */
.floating-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.floating-whatsapp img {
    width: 100%;
    height: 100%;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
    .products { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .products { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
    .products { grid-template-columns: repeat(2, 1fr); }
    .card img { height: 160px; }
}

@media (max-width: 400px) {
    .products { grid-template-columns: 1fr; }
    .card img { height: 140px; }
}
/* =========================
   HEADER SOCIAL ICONS
========================= */

.header-socials {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 10px;
}

.header-socials .social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Brand colors */
.header-socials .facebook {
    background: #1877f2;
}

.header-socials .instagram {
    background: radial-gradient(circle at 30% 110%,
        #fdf497 0%, #fdf497 5%, #fd5949 45%,
        #d6249f 60%, #285AEB 90%);
}

.header-socials .tiktok {
    background: #000;
}

/* Hover effect (premium feel) */
.header-socials .social-icon:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}
body{
    border:5px solid red;
}
/* NAV LAYOUT */
.nav-links{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

/* LEFT LINKS */
.nav-left{
    display:flex;
    align-items:center;
    gap:20px;
}

/* SOCIALS */
.header-socials{
    display:flex;
    gap:12px;
}

/* ICON STYLE */
.social-icon{
    width:38px !important;
    height:38px !important;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff !important;
    font-size:18px;
    text-decoration:none;
    transition:0.3s;
}

/* COLORS */
.facebook{ background:#1877f2; }
.tiktok{ background:#000; }

.instagram{
    background: radial-gradient(circle at 30% 110%,
        #fdf497 0%, #fd5949 45%,
        #d6249f 60%, #285AEB 90%);
}

/* HOVER */
.social-icon:hover{
    transform:translateY(-4px);
    box-shadow:0 8px 18px rgba(0,0,0,0.25);
}
/* WHATSAPP HEADER LINK */
.whatsapp-link{
    color:#25D366 !important;   /* WhatsApp green */
    font-weight:600;
}

/* Icon green */
.whatsapp-link i{
    color:#25D366 !important;
    font-size:18px;
}

/* Hover effect */
.whatsapp-link:hover{
    color:#1ebe5d !important;
}

.whatsapp-link:hover i{
    color:#1ebe5d !important;
}
/* =========================
   PREMIUM WHATSAPP BUTTON
========================= */

.whatsapp-button{
    display:flex;
    align-items:center;
    gap:10px;
    background:#25D366;
    color:#fff !important;
    padding:6px 14px 6px 6px;
    border-radius:50px; /* pill shape */
    text-decoration:none;
    font-weight:600;
    transition:0.3s;
}

/* Circle inside */
.whatsapp-circle{
    width:34px;
    height:34px;
    border-radius:50%;
    background:#1ebe5d;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
}

/* Hover */
.whatsapp-button:hover{
    background:#1ebe5d;
    transform:translateY(-2px);
    box-shadow:0 6px 14px rgba(0,0,0,0.25);
}
/* FOOTER WHATSAPP TEXT */
.footer-whatsapp-text{
    color:#25D366 !important;
    font-weight:600;
}

.footer-whatsapp-text i{
    color:#25D366 !important;
}

/* Hover */
.footer-whatsapp-text:hover{
    color:#1ebe5d !important;
}

.footer-whatsapp-text:hover i{
    color:#1ebe5d !important;
}
/* STOP FOOTER FROM STRETCHING WHATSAPP BUTTON */
.main-footer .whatsapp-button{
    display:inline-flex !important;
    width:auto !important;
    max-width:max-content;
}
/* =========================
   NAV DROPDOWN
========================= */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border-radius: 6px;
    display: none;
    z-index: 999;
    padding: 8px 0;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.dropdown-empty {
    padding: 10px 15px;
    color: #999;
    font-size: 13px;
}
/* ================= HEADER ================= */
.main-header {
    background: #c76b1e; /* orange */
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.logo-img {
    height: 40px;
}

/* ================= NAV ================= */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.nav-link:hover {
    opacity: 0.85;
}

/* ================= DROPDOWN ================= */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    display: flex;
}

.dropdown-item {
    padding: 10px;
    color: #333;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f4f4f4;
}

/* ================= CART ================= */
.cart-link {
    position: relative;
}

.cart-count {
    background: red;
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: -6px;
    right: -10px;
}

/* ================= SOCIALS ================= */
.header-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icon {
    color: #fff;
    font-size: 16px;
}

/* WhatsApp */
.whatsapp-button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #25d366;
    color: #fff;
    padding: 6px 10px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
}

/* ================= MOBILE ================= */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

/* ======= PHONE VIEW ======= */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        background: #c76b1e;
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-left {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .nav-link {
        width: 100%;
    }

    .header-socials {
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .whatsapp-text {
        display: none;
    }
}
