/* Gaon Radio Storefront — base styles, mobile-first */
:root {
    --gr-primary: #2e7d32;       /* Field green */
    --gr-primary-dark: #1b5e20;
    --gr-accent: #f57c00;        /* Marigold */
    --gr-accent-soft: #fff4e5;
    --gr-cream: #fffaf2;
    --gr-text: #2d2d2d;
    --gr-text-soft: #6c757d;
    --gr-border: #e6e0d4;
    --gr-radius: 8px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Rubik', 'Noto Sans Devanagari', sans-serif; color: var(--gr-text); background: var(--gr-cream); line-height: 1.6; }
body[lang="hi"] { font-family: 'Noto Sans Devanagari', 'Rubik', sans-serif; }

/* Topbar */
.gr-topbar { background: var(--gr-primary-dark); color: rgba(255,255,255,0.85); font-size: 0.85rem; padding: 0.4rem 0; position: relative; z-index: 1100; }
.gr-topbar > .container > * > a:not(.dropdown-item),
.gr-topbar > .container > a:not(.dropdown-item) { color: inherit; text-decoration: none; }
.gr-topbar > .container > * > a:not(.dropdown-item):hover { color: white; }

/* Language dropdown — items inside the popup get dark text on white bg */
.gr-topbar .dropdown-menu { color: var(--gr-text); padding: .25rem 0; min-width: 12rem; z-index: 1100; }
.gr-topbar .dropdown-item { color: var(--gr-text); padding: .5rem 1rem; display: flex; align-items: center; gap: .5rem; text-decoration: none; }
.gr-topbar .dropdown-item:hover, .gr-topbar .dropdown-item:focus { background: var(--gr-cream); color: var(--gr-primary-dark); }
.gr-topbar .dropdown-item.active { background: var(--gr-primary-soft); color: var(--gr-primary-dark); font-weight: 600; }
.gr-topbar .dropdown-item small { color: var(--gr-text-soft); margin-left: auto; font-size: .75rem; }

/* Main header */
.gr-header { background: white; border-bottom: 1px solid var(--gr-border); padding: 0.9rem 0; position: sticky; top: 0; z-index: 1000; }
.gr-logo { font-weight: 700; font-size: 1.5rem; color: var(--gr-primary); text-decoration: none; }
.gr-logo span { color: var(--gr-accent); }
.gr-search { flex: 1; max-width: 500px; }
.gr-search input { border-radius: 999px; padding-left: 1.2rem; }
.gr-icon-btn { background: none; border: none; color: var(--gr-text); position: relative; padding: 0.4rem; }
.gr-icon-btn .badge { position: absolute; top: 0; right: 0; }

.gr-lang-switcher { background: var(--gr-cream); border: 1px solid var(--gr-border); border-radius: 999px; padding: 0.25rem 0.9rem; font-weight: 500; font-size: 0.85rem; color: var(--gr-primary); text-decoration: none; }
.gr-lang-switcher:hover { background: var(--gr-primary); color: white; }

/* Nav menu */
.gr-nav { background: white; border-bottom: 1px solid var(--gr-border); }
.gr-nav .nav-link { color: var(--gr-text); font-weight: 500; padding: 0.8rem 1rem; }
.gr-nav .nav-link:hover { color: var(--gr-primary); }
/* First/last items flush with the container edge (so they line up with the logo
   and breadcrumb above/below — Bootstrap's .nav-link padding pushes them in). */
.gr-nav .nav > .nav-item:first-child > .nav-link { padding-left: 0; }
.gr-nav .nav > .nav-item:last-child > .nav-link { padding-right: 0; }

/* Hero */
.gr-hero { background: linear-gradient(135deg, var(--gr-accent-soft) 0%, var(--gr-cream) 100%); padding: 3rem 0; }
.gr-hero h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; color: var(--gr-primary-dark); }
.gr-hero p.subtitle { font-size: 1.1rem; color: var(--gr-text-soft); }
.gr-hero img { border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }

/* Section */
.gr-section { padding: 3rem 0; }
.gr-section-title { font-weight: 700; color: var(--gr-primary-dark); margin-bottom: 1.5rem; font-size: 1.6rem; }

/* Breadcrumb links — black, not Bootstrap blue */
.breadcrumb-item a { color: var(--gr-text); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--gr-primary); text-decoration: underline; }
.breadcrumb-item.active { color: var(--gr-text-soft, #6c757d); }

/* Category cards */
.gr-cat-card { display: block; background: white; border: 1px solid var(--gr-border); border-radius: var(--gr-radius); overflow: hidden; text-decoration: none; color: var(--gr-text); transition: all .2s; }
.gr-cat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: var(--gr-primary); }
.gr-cat-card img { width: 100%; height: 160px; object-fit: cover; }
.gr-cat-card .body { padding: 0.8rem 1rem; }
.gr-cat-card h6 { margin: 0; font-weight: 600; }
.gr-cat-card .small { color: var(--gr-text-soft); }

/* Product cards */
.gr-product-card { background: white; border: 1px solid var(--gr-border); border-radius: var(--gr-radius); overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: all .2s; }
.gr-product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.gr-product-card .img-wrap { aspect-ratio: 1/1; overflow: hidden; background: #f5f5f5; }
.gr-product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gr-product-card:hover .img-wrap img { transform: scale(1.05); }
.gr-product-card .body { padding: 0.9rem 1rem; flex: 1; display: flex; flex-direction: column; }
.gr-product-card h6 { font-size: 0.95rem; font-weight: 600; color: var(--gr-text); margin-bottom: 0.4rem; }
.gr-product-card h6 a { color: inherit; text-decoration: none; }
.gr-product-card h6 a:hover { color: var(--gr-primary); }
.gr-product-card .vendor { font-size: 0.8rem; color: var(--gr-text-soft); margin-bottom: 0.5rem; }
.gr-product-card .price { font-size: 1.05rem; font-weight: 700; color: var(--gr-primary-dark); }
.gr-product-card .compare { font-size: 0.85rem; color: var(--gr-text-soft); text-decoration: line-through; margin-left: 0.4rem; }
.gr-product-card .badge-discount { background: var(--gr-accent); color: white; font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 4px; margin-left: 0.4rem; }
.gr-product-card .actions { margin-top: 0.8rem; }
.gr-product-card .btn-add { background: var(--gr-primary); color: white; width: 100%; border-radius: 6px; padding: 0.5rem; font-weight: 500; border: none; }
.gr-product-card .btn-add:hover { background: var(--gr-primary-dark); }
.gr-product-card .seasonal-tag { display: inline-block; background: #e3f2fd; color: #0277bd; font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 4px; margin-bottom: 0.4rem; }

/* Why us */
.gr-why { background: white; border-radius: var(--gr-radius); padding: 1.5rem; height: 100%; border: 1px solid var(--gr-border); text-align: center; }
.gr-why .icon { font-size: 2rem; color: var(--gr-accent); margin-bottom: 0.6rem; }
.gr-why h6 { font-weight: 600; margin-bottom: 0.4rem; }
.gr-why p { color: var(--gr-text-soft); font-size: 0.9rem; margin: 0; }

/* Footer */
.gr-footer { background: var(--gr-primary-dark); color: rgba(255,255,255,0.8); padding: 3rem 0 1.5rem; margin-top: 3rem; }
.gr-footer h6 { color: white; font-weight: 600; margin-bottom: 1rem; }
.gr-footer a { color: rgba(255,255,255,0.7); text-decoration: none; display: block; padding: 0.2rem 0; }
.gr-footer a:hover { color: white; }
.gr-footer .divider { border-top: 1px solid rgba(255,255,255,0.15); margin: 1.5rem 0; }
@media (max-width: 767.98px) {
    .gr-footer { padding: 2rem 0 1.25rem; margin-top: 2rem; }
    .gr-footer h6 { margin-bottom: 0.5rem; margin-top: 0.5rem; }
    .gr-footer .divider { margin: 1rem 0; }
    .gr-footer .gr-footer-bottom { flex-direction: column; text-align: center; gap: 0.4rem; }
}
.gr-footer-contact a { display: inline-block; padding: 0.1rem 0; }
.gr-footer-social { display: flex; flex-direction: row; gap: 0.6rem; margin-top: 0.75rem; }
.gr-footer-social a {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex !important; align-items: center; justify-content: center;
    color: #fff !important; padding: 0;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.gr-footer-social a:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 4px 12px rgba(0,0,0,0.25); }
.gr-footer-social i { font-size: 1rem; line-height: 1; }
/* Real brand colours */
.gr-footer-social .si-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.gr-footer-social .si-youtube { background: #FF0000; }
.gr-footer-social .si-facebook { background: #1877F2; }

/* Buttons — extend Bootstrap .btn so link- and button-elements align identically */
.btn-gr-primary, .btn-gr-accent, .btn-gr-outline {
    display: inline-block;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none !important;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1.4rem;
    font-size: 1rem;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}
.btn-gr-primary { background: var(--gr-primary); border-color: var(--gr-primary); color: white; }
.btn-gr-primary:hover, .btn-gr-primary:focus { background: var(--gr-primary-dark); border-color: var(--gr-primary-dark); color: white; }

.btn-gr-accent { background: var(--gr-accent); border-color: var(--gr-accent); color: white; }
.btn-gr-accent:hover, .btn-gr-accent:focus { background: #e65100; border-color: #e65100; color: white; }

.btn-gr-outline {
    background: transparent;
    color: var(--gr-text);
    border-color: var(--gr-border);
}
.btn-gr-outline:hover, .btn-gr-outline:focus { background: var(--gr-cream); border-color: var(--gr-primary); color: var(--gr-primary-dark); }

/* Product detail */
.gr-product-detail .gallery .main { aspect-ratio: 1/1; background: #f5f5f5; border-radius: var(--gr-radius); overflow: hidden; }
.gr-product-detail .gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gr-product-detail .gallery .thumbs { display: flex; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.gr-product-detail .gallery .thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gr-product-detail .gallery .thumbs img.active { border-color: var(--gr-primary); }
.gr-product-detail h1 { font-size: 1.8rem; font-weight: 700; }
.gr-product-detail .price-block .price { font-size: 1.8rem; font-weight: 700; color: var(--gr-primary-dark); }
.gr-product-detail .price-block .compare { font-size: 1.1rem; color: var(--gr-text-soft); text-decoration: line-through; margin-left: 0.6rem; }
.gr-product-detail .price-block .save { color: var(--gr-accent); font-weight: 500; margin-left: 0.6rem; }

/* Mobile tweaks */
@media (max-width: 768px) {
    .gr-hero { padding: 2rem 0; }
    .gr-section { padding: 2rem 0; }
    .gr-product-card .img-wrap { aspect-ratio: 1/1; }
}

/* ===== Shop filters sidebar ===== */
.gr-shop-filters {
    background: white;
    border: 1px solid var(--gr-border);
    border-radius: var(--gr-radius);
    padding: 1.25rem;
}
.gr-filter-block {
    border-bottom: 1px solid var(--gr-border);
    padding: 0.5rem 0;
}

.gr-filter-head {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--gr-primary-dark);
    text-align: left;
}
.gr-filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.gr-filter-chev {
    color: var(--gr-text-soft, #6c757d);
    font-size: 0.8rem;
    transition: transform 0.2s;
}
.gr-filter-block.is-collapsed .gr-filter-chev { transform: rotate(-90deg); }

.gr-filter-body {
    padding-bottom: 0.75rem;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.2s ease;
    max-height: 2000px;
}
.gr-filter-block.is-collapsed .gr-filter-body {
    max-height: 0;
    opacity: 0;
    padding-bottom: 0;
}

.gr-filter-actions {
    padding-top: 1rem;
}
.gr-cat-tree { list-style: none; padding: 0; margin: 0; }
.gr-cat-tree li { margin: 0; }
.gr-cat-row { display: flex; align-items: center; justify-content: space-between; }
.gr-cat-link {
    display: block;
    padding: 0.5rem 0;
    color: var(--gr-text);
    text-decoration: none;
    flex-grow: 1;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.gr-cat-link:hover { color: var(--gr-primary); }
.gr-cat-link.is-active { color: var(--gr-primary); font-weight: 600; }
.gr-cat-toggle {
    background: transparent;
    border: 0;
    padding: 0.25rem 0.5rem;
    color: var(--gr-text-soft, #6c757d);
    cursor: pointer;
    transition: transform 0.2s;
}
.gr-cat-node.is-open > .gr-cat-row .gr-cat-toggle {
    transform: rotate(180deg);
    color: var(--gr-primary);
}
.gr-cat-subtree {
    list-style: none;
    padding-left: 1rem;
    margin: 0 0 0 0.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-left: 2px solid var(--gr-primary-tint, rgba(46,125,50,0.10));
}
.gr-cat-node.is-open > .gr-cat-subtree { max-height: 1000px; }
.gr-cat-sublink {
    font-size: 0.88rem;
    padding: 0.35rem 0 0.35rem 0.5rem;
    color: var(--gr-text-soft, #6c757d);
}
.gr-rating-filter { cursor: pointer; padding: 0.25rem 0; }
.gr-rating-filter input { cursor: pointer; }

/* Stock badge on product card */
.gr-product-card .img-wrap { position: relative; }
.gr-stock-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    z-index: 2;
}
.gr-stock-badge.oos { background: #c62828; color: #fff; }
.gr-stock-badge.low { background: #f57c00; color: #fff; }
.gr-product-card.is-oos .img-wrap img { opacity: 0.55; filter: grayscale(40%); }

/* Card rating row */
.gr-card-rating {
    font-size: 0.85rem;
    line-height: 1;
    margin: 0.25rem 0 0.5rem;
}
.gr-card-rating i { color: #f5a623; font-size: 0.8rem; }

/* ===== Checkout steps ===== */
.gr-checkout-steps {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
    counter-reset: step;
    gap: 0;
}
.gr-step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gr-text-soft, #6c757d);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}
.gr-step:not(:last-child)::after {
    content: "";
    flex: 1;
    height: 2px;
    background: var(--gr-border, #e6e0d4);
    margin: 0 0.75rem;
}
.gr-step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gr-border, #e6e0d4);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}
.gr-step.is-active .gr-step-num { background: var(--gr-primary); }
.gr-step.is-active { color: var(--gr-text); font-weight: 600; }
.gr-step.is-done .gr-step-num { background: var(--gr-primary); }
.gr-step.is-done:not(:last-child)::after { background: var(--gr-primary); }
.gr-step.is-done { color: var(--gr-primary); }
@media (max-width: 575px) {
    .gr-step-label { display: none; }
    .gr-step:not(:last-child)::after { margin: 0 0.25rem; }
}

/* ===== Checkout address cards ===== */
.gr-address-list { display: flex; flex-direction: column; gap: 0.75rem; }
.gr-address-card {
    display: block;
    border: 2px solid var(--gr-border, #e6e0d4);
    border-radius: var(--gr-radius, 8px);
    padding: 1rem 1rem 1rem 2.75rem;
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
}
.gr-address-card input[type="radio"] {
    position: absolute;
    left: 1rem; top: 1.15rem;
}
.gr-address-card:hover { border-color: var(--gr-primary); }
.gr-address-card.is-selected {
    border-color: var(--gr-primary);
    box-shadow: 0 0 0 3px var(--gr-primary-soft, #e8f5e9);
}
.gr-address-empty {
    border: 2px dashed var(--gr-border, #e6e0d4);
    border-radius: var(--gr-radius, 8px);
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--gr-text-soft, #6c757d);
    background: #fafafa;
}
.gr-address-empty i { font-size: 2rem; opacity: 0.5; margin-bottom: 0.75rem; display: block; }

/* ===== Checkout side panel (add address / summary) ===== */
.gr-checkout-panel {
    background: #fff;
    border: 1px solid var(--gr-border, #e6e0d4);
    border-radius: var(--gr-radius, 8px);
    padding: 1.25rem;
}
.gr-checkout-panel-title {
    font-weight: 700;
    color: var(--gr-primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--gr-border, #e6e0d4);
}
