/* Shop Page Styles */
.shop-page {
    background: #f9f7fb;
    padding-bottom: 60px;
    min-height: calc(100vh - var(--wd-header-h, 160px));
}

.shop-hero {
    background: linear-gradient(135deg, #fdf2f7 0%, #f8e7ff 100%);
    border-bottom: 1px solid #f26a301a;
    margin-bottom: 40px;
}

.shop-hero-content {
    padding: 40px 0;
    text-align: center;
}

.shop-hero-content h1 {
    color: #1e1e1e;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.shop-hero-content p {
    color: #5f5f5f;
    font-size: 14px;
}

.shop-categories-strip {
    margin-top: -20px;
    padding-bottom: 10px;
}

.shop-category-pills {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.shop-category-pills::-webkit-scrollbar {
    display: none;
}

.shop-category-chip {
    border: 1px solid rgba(15, 47, 54, 0.12);
    border-radius: 999px;
    padding: 10px 22px;
    background: #fff;
    color: #0f2f36;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 6px 18px rgba(15, 47, 54, 0.08);
    white-space: nowrap;
}

.shop-category-chip:hover {
    border-color: #f26a30;
    color: #f26a30;
}

.shop-category-chip.active {
    background: linear-gradient(135deg, #0f2f36, #13414a);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(15, 47, 54, 0.2);
}

.shop-mobile-actions {
    display: none;
    justify-content: center;
    margin: 10px 0 0;
}

.shop-mobile-action {
    border: 1px solid #f26a3033;
    border-radius: 16px;
    padding: 10px 18px;
    background: #fff;
    color: #0f2f36;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 26px rgba(15, 47, 54, 0.12);
}

.shop-mobile-action i {
    color: #f26a30;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-top: 30px;
}

/* Sidebar */
.shop-sidebar {
    position: sticky;
    top: calc(var(--wd-header-h, 160px) + 20px);
    align-self: start;
    max-height: calc(100vh - var(--wd-header-h, 160px) - 40px);
    overflow-y: auto;
}

.shop-filters {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 40px #150b3414;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f26a3014;
}

.filters-header h2 {
    color: #1f1f1f;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.filters-clear {
    color: #f26a30;
    background: #f26a3014;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filters-clear:hover {
    background: #f26a30;
    color: #fff;
}

.filters-close-btn {
    border: none;
    background: transparent;
    color: #b4b4b4;
    font-size: 20px;
    display: none;
    margin-right: 8px;
    cursor: pointer;
}

.filters-close-btn:hover {
    color: #f26a30;
}

.shop-filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 7, 16, 0.55);
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.shop-filters-overlay.active {
    opacity: 1;
    visibility: visible;
}

body.no-scroll {
    overflow: hidden;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    color: #222;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.filter-option:hover {
    background: #f5f5f5;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f26a30;
}

.filter-option span {
    color: #434343;
    font-size: 13px;
    user-select: none;
}

.filter-input {
    width: 100%;
    background: #fff;
    border: 1px solid #f26a3033;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-input:focus {
    border-color: #f26a30;
    outline: none;
    box-shadow: 0 0 0 4px #f26a302e;
}

/* Main Content */
.shop-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    padding: 16px 24px;
    box-shadow: 0 8px 24px #150b340d;
}

.shop-results-info {
    color: #434343;
    font-size: 14px;
    font-weight: 500;
}

.shop-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shop-sort label {
    color: #434343;
    font-size: 13px;
    font-weight: 500;
}

.sort-select {
    background: #fff;
    border: 1px solid #f26a3033;
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    border-color: #f26a30;
    outline: none;
}

/* Products Grid */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.loading-state,
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f26a3014;
    border-top-color: #f26a30;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p,
.error-state p {
    color: #6a6a6a;
    font-size: 14px;
}

.error-state i {
    color: #f26a30;
    font-size: 48px;
}

/* Empty State */
.shop-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    background: #fff;
    border-radius: 24px;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 60px 40px;
    display: flex;
    box-shadow: 0 20px 60px #150b3414;
}

.shop-empty-icon {
    color: #f26a30;
    background: #f26a3014;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    font-size: 28px;
    display: inline-flex;
}

.shop-empty-state h2 {
    color: #1d1d1d;
    font-size: 22px;
    margin: 0;
}

.shop-empty-state p {
    color: #7a7a7a;
    max-width: 420px;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

/* Pagination */
.shop-pagination {
    margin-top: 20px;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    color: #434343;
    background: #fff;
    border: 1px solid #f26a3033;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: #f26a3014;
    border-color: #f26a30;
    color: #f26a30;
}

.pagination-btn.active {
    background: #f26a30;
    border-color: #f26a30;
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    color: #a0a0a0;
    padding: 0 8px;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-mobile-actions {
        display: flex;
    }

    .shop-sidebar {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1100;
        padding: 0 20px 20px;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        pointer-events: none;
    }

    .shop-sidebar.is-open {
        display: block;
        transform: translateY(0);
        pointer-events: auto;
    }

    .shop-filters {
        margin-bottom: 0;
        border-radius: 24px 24px 0 0;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        box-shadow: 0 -10px 40px rgba(15, 15, 20, 0.25);
    }

    .filters-close-btn {
        display: inline-flex;
    }

    .shop-filters-overlay[hidden] {
        display: none;
    }

    .shop-category-pills {
        padding: 16px 12px;
    }

    .shop-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .shop-hero-content {
        padding: 30px 0;
    }

    .shop-hero-content h1 {
        font-size: 24px;
    }

    .shop-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .shop-sort {
        justify-content: space-between;
    }

    .shop-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .pagination-wrapper {
        gap: 6px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .shop-empty-state {
        padding: 40px 20px;
    }
}

/* Add to Cart Button Styles for Shop Page */
.shop-products-grid .add-to-cart-loop {
    background: linear-gradient(135deg, #f26a30 0%, #f2844a 100%);
    color: #fff !important;
    border-radius: 999px;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    box-shadow: 0 4px 16px rgba(242, 106, 48, 0.4);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: auto;
    width: auto;
    height: auto;
}

.shop-products-grid .add-to-cart-loop::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.shop-products-grid .add-to-cart-loop:hover::before {
    left: 100%;
}

.shop-products-grid .add-to-cart-loop:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(242, 106, 48, 0.5);
    background: linear-gradient(135deg, #f26a30 0%, #f26a30 100%);
}

.shop-products-grid .add-to-cart-loop:active {
    transform: translateY(0) scale(1);
    box-shadow: 0 4px 12px rgba(242, 106, 48, 0.4);
}

.shop-products-grid .add-to-cart-loop svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    stroke: currentColor;
    fill: none;
}

.shop-products-grid .add-to-cart-loop .add-to-cart-text {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    color: #fff !important;
}

.shop-products-grid .add-to-cart-loop:disabled,
.shop-products-grid .add-to-cart-loop.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #999 0%, #777 100%);
}

.shop-products-grid .add-to-cart-loop:disabled:hover,
.shop-products-grid .add-to-cart-loop.disabled:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(242, 106, 48, 0.4);
    background: linear-gradient(135deg, #999 0%, #777 100%);
}

.shop-products-grid .add-to-cart-loop.processing {
    pointer-events: none;
    opacity: 0.8;
}

.shop-products-grid .add-to-cart-loop.processing .add-to-cart-text::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Ensure button container is properly styled */
.shop-products-grid .wd-buttons {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

.shop-products-grid .wd-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Product card hover effect */
.shop-products-grid .wd-product:hover .add-to-cart-loop {
    opacity: 1;
    visibility: visible;
}

/* Responsive adjustments for add to cart button */
@media (max-width: 768px) {
    .shop-products-grid .add-to-cart-loop {
        padding: 8px 14px;
        font-size: 12px;
        gap: 6px;
    }
    
    .shop-products-grid .add-to-cart-loop svg {
        width: 16px;
        height: 16px;
    }
    
    .shop-products-grid .add-to-cart-loop .add-to-cart-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .shop-products-grid .add-to-cart-loop {
        padding: 6px 12px;
        font-size: 11px;
        gap: 4px;
    }
    
    .shop-products-grid .add-to-cart-loop svg {
        width: 14px;
        height: 14px;
    }
    
    .shop-products-grid .add-to-cart-loop .add-to-cart-text {
        font-size: 11px;
    }
    
    .shop-products-grid .wd-buttons {
        top: 8px;
        right: 8px;
    }
}

/* Product Timer Styles for Shop Page */
.shop-products-grid .product-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(242, 106, 48, 0.95) 0%, rgba(255, 138, 79, 0.95) 100%);
    color: #fff;
    padding: 10px 14px;
    border-radius: 0 0 14px 14px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.shop-products-grid .product-timer .timer-value {
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 6px;
    min-width: 30px;
    text-align: center;
    backdrop-filter: blur(4px);
    color: #fff !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.shop-products-grid .product-timer .timer-unit {
    font-size: 8.5px;
    font-weight: 500;
    opacity: 0.75;
    color: #fff !important;
}

.shop-products-grid .product-timer .timer-separator {
    font-size: 12px;
    font-weight: 700;
    margin: 0 2px;
    opacity: 0.7;
    color: #fff !important;
}

@media (max-width: 768px) {
    .shop-products-grid .product-timer .timer-value {
        font-size: 13px;
        padding: 3px 5px;
        min-width: 26px;
    }
    
    .shop-products-grid .product-timer .timer-unit {
        font-size: 7.5px;
    }
    
    .shop-products-grid .product-timer .timer-separator {
        font-size: 12px;
    }
}

