/* ═══════════════════════════════════════════════════════
   Salvina Hijab — Homepage Stylesheet
   assets/homepage/style.css
═══════════════════════════════════════════════════════ */

/* ── Navbar ──────────────────────────────────────────── */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.navbar-brand img {
    height: 40px;
    object-fit: contain;
}

/* Remove Bootstrap's auto-caret from navbar top-level dropdowns */
.navbar .nav-link.dropdown-toggle::after {
    display: none;
}

/* Search dropdown panel */
.search-dropdown {
    width: 500px;
    max-width: calc(100vw - 24px);
    padding: 0;                      /* spacing handled by inner wrapper div */
}
.search-dropdown input.form-control {
    font-size: 1rem;
    padding: 10px 14px;
    min-width: 0;
    flex: 1 1 auto;
}
.search-dropdown .btn {
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Nav right-side icon buttons ──────────────────────── */
.nav-icon-btn {
    background: none;
    border: none;
    padding: 0;
    color: #212529;
    font-size: 1.2rem;
    position: relative;
    cursor: pointer;
    line-height: 1;
    transition: color .2s;
}
.nav-icon-btn:hover { color: #dc3545; }
.nav-icon-btn .badge {
    font-size: .6rem;
    padding: 2px 5px;
}

/* ── Dropdown menus — sizing & spacing ───────────────── */
.dropdown-menu {
    min-width: 200px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    padding: 8px 0;
}
.dropdown-item {
    padding: 9px 18px;
    font-size: .92rem;
    white-space: nowrap;
}
.dropdown-item:hover {
    background: #fff5f5;
    color: #dc3545;
}

/* Nested submenu panel */
.dropdown-submenu-menu {
    min-width: 200px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}

/* Remove Bootstrap's caret arrow from submenu toggle items */
.dropdown-submenu > a.dropdown-toggle::after {
    display: none;
}

/* ── Collapsed navbar (<lg): keep the icon dropdowns on screen ────────
   Inside a navbar Bootstrap disables Popper, so .dropdown-menu-end is
   placed by CSS alone — its right edge pinned to the button. Bootstrap
   only neutralises this for menus inside .navbar-nav; the search / cart /
   account icons sit in a plain flex row, so their menus hung off the
   left edge of the screen. Anchor them to that row instead of the
   button so they span its full width. */
@media (max-width: 991.98px) {
    .navbar .navbar-collapse > .d-flex {
        position: relative;
    }
    .navbar .navbar-collapse > .d-flex .dropdown {
        position: static;
    }
    .navbar .navbar-collapse > .d-flex .dropdown-menu {
        left: 0;
        right: auto;
        width: 100%;
        max-width: 100%;
    }
}

/* ── Carousel flush under navbar ─────────────────────── */
.carousel-item img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    object-position: top center;
}
@media (max-width: 575.98px) {
    .carousel-item img { height: 260px; }
}
.carousel-caption-custom {
    position: absolute;
    bottom: 60px;
    left: 60px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .55);
}
.carousel-caption-custom h2 {
    font-size: 2.4rem;
    font-weight: 700;
}

/* ── Section titles ──────────────────────────────────── */
.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: .5rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #dc3545;
    margin-top: .35rem;
}

/* ── Product cards ───────────────────────────────────── */
.product-card {
    transition: transform .2s, box-shadow .2s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .14);
}
.product-card .card-img-top {
    height: 400px;
    object-fit: cover;
}
@media (max-width: 575.98px) {
    .product-card .card-img-top { height: 600px; }
}
.product-card .badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
}
.product-card .wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, .8);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.product-card .wishlist-btn:hover { background: #fff; }

.price-original {
    text-decoration: line-through;
    color: #aaa;
    font-size: .85rem;
}
.price-sale {
    color: #dc3545;
    font-weight: 700;
    font-size: 1rem;
}

/* ── Category banner cards ───────────────────────────── */
.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}
.category-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform .35s;
}
.category-card:hover img { transform: scale(1.06); }
.category-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ── Promo banner strip ──────────────────────────────── */
.promo-banner {
    background: linear-gradient(135deg, #b5005b 0%, #dc3545 100%);
    color: #fff;
    border-radius: 14px;
}

/* ── Offcanvas panels (Wishlist & Cart) ──────────────── */
.offcanvas-panel .offcanvas-header {
    border-bottom: 1px solid #f0f0f0;
}
.panel-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}
.panel-item img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.panel-item-info {
    flex: 1;
    min-width: 0;
}
.panel-item-info .item-name {
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.panel-item-info .item-price {
    color: #dc3545;
    font-weight: 700;
    font-size: .9rem;
}
.panel-item-info .item-meta {
    font-size: .78rem;
    color: #888;
}
.panel-remove-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: .9rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .2s;
}
.panel-remove-btn:hover { color: #dc3545; }

/* Cart qty controls */
.qty-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.qty-control button {
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: .8rem;
    border-radius: 4px;
}
.qty-control span {
    font-size: .88rem;
    min-width: 20px;
    text-align: center;
}

.panel-total {
    border-top: 2px solid #f0f0f0;
    padding-top: 14px;
    margin-top: auto;
}

/* ── Footer ──────────────────────────────────────────── */
footer {
    background: #1a1a2e;
    color: #ccc;
}
footer a {
    color: #ccc;
    text-decoration: none;
    transition: color .2s;
}
footer a:hover { color: #fff; }
footer .footer-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}
footer .social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    transition: background .2s;
}
footer .social-icon:hover { background: rgba(255, 255, 255, .25); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ── WhatsApp float button ───────────────────────────── */
#waFloat {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1050;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(37, 211, 102, .45);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
#waFloat:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(37, 211, 102, .6);
    color: #fff;
}
#waFloat .wa-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    background: #333;
    color: #fff;
    font-size: .78rem;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
#waFloat:hover .wa-tooltip { opacity: 1; }
