/* ===============================================
   Shop & Category Pages - Enhanced Styles
   =============================================== */

.cursor-pointer {
    cursor: pointer;
}

.product-item {
    transition: all 0.3s ease;
}

/* ========================================
   CATEGORY HERO BANNER
   ======================================== */

/* ========================================
   CATEGORY HERO BANNER (HIDDEN)
   ======================================== */
.category-banner {
    display: none !important;
}

/* ========================================
   FILTER CHIPS (Active Filters)
   ======================================== */

.filter-chips-container {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--am-primary-light);
    color: var(--am-primary);
    border: 1px solid var(--am-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.filter-chip:hover {
    background: var(--am-primary);
    color: white;
}

.filter-chip .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.7;
    padding: 0 4px;
}

.filter-chip .remove-filter:hover {
    opacity: 1;
}

.clear-all-filters {
    color: var(--am-danger);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.clear-all-filters:hover {
    color: #c82333;
}

/* ========================================
   SHOP TOOLBAR (Sort & View Options)
   ======================================== */

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--am-bg-light);
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.product-count {
    font-size: 0.95rem;
    color: var(--am-text-muted);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-dropdown label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.sort-dropdown select {
    padding: 0.4rem 2rem 0.4rem 0.8rem;
    border: 1px solid var(--am-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    width: auto;
    min-width: 160px;
    color: var(--am-text-dark);
    font-weight: 500;
}

.sort-dropdown select:focus {
    border-color: var(--am-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--am-primary-light);
}

/* ========================================
   SIDEBAR FILTERS (Responsive)
   ======================================== */

.shop-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.filter-section {
    border-bottom: 1px solid var(--am-border-light);
    padding: 1rem 0;
}

.filter-section:last-child {
    border-bottom: none;
}

/* Mobile Filter Toggle Button */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 1px solid var(--am-border);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 1rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .mobile-filter-btn {
        display: inline-flex;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        /* Hidden by default */
        width: 280px;
        height: 100vh;
        z-index: 1050;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .shop-sidebar.active {
        left: 0;
    }

    /* Sidebar Close Button */
    .shop-sidebar .close-sidebar {
        display: block;
        text-align: right;
        margin-bottom: 1rem;
        font-size: 1.5rem;
        cursor: pointer;
    }

    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

.filter-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--am-text-dark);
    margin-bottom: 1rem;
}

.filter-section-title i {
    transition: transform var(--transition-fast);
}

.filter-section.collapsed .filter-section-title i {
    transform: rotate(-90deg);
}

.filter-options {
    display: block;
}

.filter-section.collapsed .filter-options {
    display: none;
}

.filter-option {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
}

.filter-option input[type="checkbox"] {
    margin-right: 0.5rem;
}

.filter-option label {
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Price Range Slider */
.price-range-slider {
    padding: 1rem 0;
}

.price-inputs {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.price-inputs input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--input-border);
    border-radius: 4px;
}

/* ========================================
   ENHANCED PRODUCT GRID
   ======================================== */

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

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

@media (max-width: 767px) {
    .shop-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 575px) {
    .shop-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .shop-product-card .product-info {
        padding: 0.5rem;
    }

    .product-name {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }

    .current-price {
        font-size: 0.85rem;
    }

    .original-price {
        font-size: 0.75rem;
    }

    .btn-add-to-cart {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Enhanced Product Card */
.shop-product-card {
    background: white;
    border: 1px solid var(--am-border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.shop-product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--am-primary);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.shop-product-card:hover .product-image-wrapper img {
    transform: scale(1.1);
}

/* ========================================
   DISCOUNT BADGES
   ======================================== */

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--am-danger);
    color: white;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.discount-badge .discount-percent {
    font-size: 16px;
    line-height: 1;
}

.discount-badge .off-text {
    font-size: 10px;
    text-transform: uppercase;
}

.badge-new {
    background: var(--am-info);
}

.badge-sale {
    background: var(--am-danger);
}

.badge-hot {
    background: var(--am-warning);
}

/* ========================================
   PRODUCT INFO
   ======================================== */

.product-info {
    padding: 1rem;
}

.product-category {
    font-size: 0.75rem;
    color: var(--am-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--am-text-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars {
    color: var(--am-warning);
    font-size: 0.875rem;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--am-text-muted);
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--am-primary);
}

.original-price {
    font-size: 0.95rem;
    color: var(--am-text-muted);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-to-cart {
    flex: 1;
    background: var(--am-primary);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-to-cart:hover {
    background: var(--am-primary-hover);
    transform: translateY(-2px);
}

.btn-wishlist {
    background: white;
    border: 1px solid var(--am-border);
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-wishlist:hover {
    border-color: var(--am-danger);
    color: var(--am-danger);
}

/* ========================================
   PAGINATION
   ======================================== */

.shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--am-border-light);
}

.shop-pagination .pagination {
    display: flex;
    gap: 0.5rem;
}

.shop-pagination .page-item .page-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--am-border);
    color: var(--am-text-dark);
    border-radius: 4px;
}

.shop-pagination .page-item.active .page-link {
    background: var(--am-primary);
    color: white;
    border-color: var(--am-primary);
}

.shop-pagination .page-item:hover .page-link {
    background: var(--am-primary-light);
    border-color: var(--am-primary);
}

/* ========================================
   MOBILE ENHANCEMENTS
   ======================================== */

@media (max-width: 991px) {
    .shop-sidebar {
        margin-bottom: 2rem;
    }

    .filter-chips-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .filter-chips {
        flex-wrap: nowrap;
    }
}

@media (max-width: 767px) {
    .shop-toolbar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .sort-dropdown {
        width: 100%;
    }

    .sort-dropdown select {
        flex: 1;
    }
}

/* ========================================
   EMPTY STATE
   ======================================== */

.no-products-found {
    text-align: center;
    padding: 4rem 2rem;
}

.no-products-found i {
    font-size: 4rem;
    color: var(--am-text-light);
    margin-bottom: 1rem;
}

.no-products-found h3 {
    color: var(--am-text-dark);
    margin-bottom: 0.5rem;
}

.no-products-found p {
    color: var(--am-text-muted);
}

/* ========================================
   RESPONSIVE FOOTER STYLES
   ======================================== */

@media (max-width: 767px) {

    /* Newsletter Section */
    .newsletter-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .newsletter-left {
        justify-content: center;
    }

    .newsletter-form form {
        flex-direction: row;
        /* Horizontal alignment */
        gap: 0;
        /* Remove gap as input group handles border */
        align-items: stretch;
    }

    .newsletter-input-group {
        width: auto;
        flex: 1;
        /* Take available width */
    }

    .btn-subscribe {
        width: auto;
        /* Auto width based on content */
        padding: 0 1rem;
        /* Adjust padding */
        font-size: 0.85rem;
    }

    .app-download {
        justify-content: center;
    }

    /* Footer Links */
    .footer-col {
        margin-bottom: 2rem;
    }

    .footer-social-payment .row {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-social-payment .col-md-6 {
        display: flex;
        justify-content: center;
    }

    .footer-social-payment .d-flex {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-title {
        margin-right: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .social-icons,
    .payment-icons {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        /* Prevent icons overlaying text */
    }
}

/* ========================================
   APP-LIKE PRODUCT CARDS (Homepage)
   ======================================== */

.am-card {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
    margin-bottom: 5px;
    /* Spacing for shadow */
}

.am-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.am-card .img-wrap {
    height: 180px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    /* Subtle background for transparency */
    border-radius: 8px;
    padding: 10px;
    /* Padding to prevent image touching edges */
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    mix-blend-mode: multiply;
    /* Optional: helps remove white background artifacts */
}

.am-card .p-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--am-text-dark);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 40px;
    /* Space for button if needed, though button is absolute bottom */
}

.am-card .price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 5px;
    min-height: 45px;
    /* Ensure consistency */
}

.am-card .p-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--am-text-dark);
}

.am-card .p-old-price {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: var(--am-text-muted);
}

/* Floating Action Buttons */
.btn-add-cart-app,
.btn-wishlist-app {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    /* Circular shape */
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10;
    text-decoration: none !important;
    padding: 0;
    line-height: 0;
}

.btn-add-cart-app i,
.btn-wishlist-app i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0;
    width: 1em;
    height: 1em;
}

.btn-add-cart-app .fa-shopping-cart {
    transform: translate(0.5px, -0.5px);
}

.btn-add-cart-app {
    background-color: #E85D34;
    /* Orange color from screenshot */
    color: white !important;
    position: absolute;
    bottom: 12px;
    right: 12px;
    box-shadow: 0 4px 10px rgba(232, 93, 52, 0.3);
    font-size: 1.1rem;
}

.btn-add-cart-app:hover {
    background-color: #d14d26;
    transform: scale(1.1);
    color: white !important;
}

.btn-wishlist-app {
    background-color: rgba(255, 255, 255, 0.9);
    color: #ccc;
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.btn-wishlist-app:hover {
    color: #ff4757;
    background: white;
}

.discount-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    color: white;
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* ========================================
   RESPONSIVE HERO BUTTON
   ======================================== */
@media (max-width: 767px) {
    .responsive-shop-btn {
        padding: 0.5rem 1.5rem !important;
        font-size: 0.9rem !important;
        width: auto !important;
        min-width: 120px;
    }
}

/* ========================================
   SEE ALL LINK STYLING
   ======================================== */
.flash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 1rem 15px;
    /* Added horizontal padding */
    border-bottom: 2px solid #eee;
    margin-bottom: 1rem;
}

.flash-header .title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f3460;
    /* Dark Navy */
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flash-header .see-all,
.section-header-plain .see-all-link {
    /* Standardize all 'See All' links */
    color: #0f3460 !important;
    /* Matching Dark Navy */
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.section-header-plain {
    padding: 1rem 15px;
    /* Added padding to other headers too */
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0f3460;
}

.flash-header .see-all:hover {
    color: var(--am-primary);
}

.discount-tag small {
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 1px;
}

@media (max-width: 575px) {
    .flash-header .title {
        font-size: 1rem;
    }

    .flash-header .see-all {
        font-size: 0.75rem;
    }

    /* Force button visibility on mobile */
    .slider-overlay-btn {
        bottom: 15px !important;
        width: 100%;
        text-align: center;
    }

    .responsive-shop-btn {
        padding: 0.5rem 2rem !important;
        font-size: 0.9rem !important;
        display: inline-block !important;
        /* Ensure it's not hidden */
    }
}

/* ========================================
   TOAST NOTIFICATION
   ======================================== */
#am-toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 50px;
    /* Pillow shape */
    padding: 12px 20px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 24px;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.5s ease-in-out;
    transform: translate(-50%, -20px);
}

#am-toast.show {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

#am-toast.success {
    background-color: #4CAF50;
    /* Green */
}

#am-toast.error {
    background-color: #F44336;
    /* Red */
}

#am-toast i {
    margin-right: 8px;
    font-size: 16px;
}

/* ========================================
   PRODUCT DETAILS PAGE BUTTONS & CONTROLS
   ======================================== */

.buy-box-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.qty-btn {
    width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #f8f9fa;
    font-weight: bold;
    color: #555;
    transition: background 0.2s;
    font-size: 16px;
}

.qty-btn:hover {
    background: #e2e6ea;
}

.qty-input-main {
    width: 50px;
    height: 44px;
    border: none;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    -moz-appearance: textfield;
}

.qty-input-main:focus {
    outline: none;
}

.qty-input-main::-webkit-outer-spin-button,
.qty-input-main::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.btn-add-to-cart-large {
    background: #001f3f;
    /* Dark Navy matches screenshot */
    color: #fff;
    padding: 0 50px;
    height: 44px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    min-width: 200px;
}

.btn-add-to-cart-large:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Secondary Buttons (Wishlist / Compare) */
.buy-box-secondary-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.buy-box-secondary-btns .btn-wishlist-app {
    position: static;
    box-shadow: none;
}

.btn-icon-round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #eee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #777;
    background: #fff;
    transition: all 0.3s ease;
    text-decoration: none !important;
    font-size: 18px;
}

.btn-icon-round:hover {
    background: var(--am-primary);
    border-color: var(--am-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(232, 102, 61, 0.2);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .buy-box-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .qty-control {
        margin-right: 0;
        justify-content: center;
    }

    .qty-input-main {
        width: 100%;
    }

    .btn-add-to-cart-large {
        width: 100%;
    }

    .buy-box-secondary-btns {
        justify-content: center;
        width: 100%;
    }
}