/**
 * Fast Bee Crackers - E-Commerce Stylesheet
 */

/* Header Cart & Wishlist Badges */
.nav-actions-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.header-icon-btn:hover {
    background: #ffcc00;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
}

.header-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e60000;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Header Search Form */
.header-search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 25px;
    padding: 2px 10px 2px 15px;
    border: 1px solid #000000;
    max-width: 220px;
    width: 100%;
}

.header-search-input {
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    background: transparent;
    padding: 6px 0;
}

.header-search-btn {
    /* background: #e60000; */
    /* color: #ffffff; */
    border: none;
    /* border-radius: 50%;
    width: 30px;
    height: 30px; */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

/* .header-search-btn:hover {
    background: #cc0000;
} */

/* Product Card Design */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(230, 0, 0, 0.12);
    border-color: #ffcccc;
}

.product-card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 85%;
    background: #fafafa;
    overflow: hidden;
}

.product-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

/* Wishlist Heart Button */
.wishlist-toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: #888888;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    z-index: 2;
}

.wishlist-toggle-btn:hover,
.wishlist-toggle-btn.active {
    background: #ffe6e6;
    color: #e60000;
    transform: scale(1.1);
}

/* 80% OFF Badge */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--accent-orange);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(230,0,0,0.3);
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #222222;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

.product-price-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.original-price {
    font-size: 0.85rem;
    color: #999999;
    text-decoration: line-through;
    font-weight: 500;
}

.selling-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #e60000;
}

.product-unit-text {
    font-size: 0.8rem;
    color: #666666;
    margin-left: auto;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    width: 100%;
    background-color: var(--accent-orange);
    color: #ffffff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background-color: var(--primary-blue);
    box-shadow: var(--shadow-gold-glow);
}

/* Products Page Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.shop-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #eaeaea;
    align-self: start;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222222;
    padding-bottom: 12px;
    border-bottom: 2px solid #ffcc00;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444444;
    margin-bottom: 12px;
}

.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 340px;
    overflow-y: auto;
}

.category-filter-item {
    margin-bottom: 4px;
}

.category-filter-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    color: #555555;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.category-filter-link:hover,
.category-filter-link.active {
    background: #fff8e6;
    color: #e60000;
    font-weight: 600;
}

.shop-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shop-toolbar {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Cart & Wishlist Page Styling */
.table-cart {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}

.table-cart th,
.table-cart td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table-cart th {
    background: #fff9e6;
    font-weight: 700;
    color: #222222;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    background: #fafafa;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-input {
    width: 44px;
    height: 32px;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.order-summary-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #555555;
}

.summary-row.total-row {
    border-top: 2px solid #eeeeee;
    padding-top: 16px;
    margin-top: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #e60000;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a1a1a;
    color: #ffffff;
    padding: 14px 24px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .shop-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }
    .shop-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .shop-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-search-box {
        display: none;
    }
}

@media (max-width: 480px) {
    .shop-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .product-card-body {
        padding: 10px;
    }
    .product-title {
        font-size: 0.85rem;
    }
    .selling-price {
        font-size: 1rem;
    }
}


/* =========================================================
   STICKY HEADER SCROLLED CONTRAST & VISIBILITY RULES
   ========================================================= */

/* Default / Top Header Action Icons */
.header-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-icon-btn:hover {
    background: #ffcc00;
    color: #0f172a !important;
    border-color: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
}

/* Scrolled White Header Action Icons (High Contrast!) */
.header-nav.scrolled .header-icon-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.header-nav.scrolled .header-icon-btn:hover {
    background: #ffcc00;
    color: #0f172a !important;
    border-color: #ffcc00;
    box-shadow: 0 4px 14px rgba(255, 204, 0, 0.5);
}

/* Badge Contrast Rules */
.header-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e60000;
    color: #ffffff !important;
    font-size: 0.72rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 10;
}

.header-nav.scrolled .header-badge {
    border-color: #ffffff;
    box-shadow: 0 2px 8px rgba(230,0,0,0.4);
}

/* Header Search Form Contrast Rules */
.header-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 2px 10px 2px 15px;
    border: 1px solid #000000;
    max-width: 220px;
    width: 100%;
    transition: all 0.3s ease;
}

.header-search-input {
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    background: transparent;
    color: #0f172a;
    padding: 6px 0;
}

.header-nav.scrolled .header-search-box {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.header-nav.scrolled .header-search-input {
    color: #0f172a;
}

.header-nav.scrolled .header-search-input::placeholder {
    color: #64748b;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-actions-wrapper {
        gap: 8px;
    }

    .header-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .header-badge {
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        font-size: 0.68rem;
    }
}
