/* Rohini Threads - Shop Page Styles */

/* ============================================
   Shop Layout
   ============================================ */
.shop-page {
    padding-top: 130px;
    min-height: 100vh;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.shop-header h1 {
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.shop-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Shop Grid Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
}

.shop-main {
    min-width: 0;
}

/* ============================================
   Filter Sidebar
   ============================================ */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-header h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.clear-filters-btn:hover {
    color: #d93636;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

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

.filter-toggle {
    transition: transform 0.3s;
}

.filter-group.collapsed .filter-toggle {
    transform: rotate(-90deg);
}

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

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
}

.filter-option:hover {
    color: var(--primary-color);
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.filter-count {
    margin-left: auto;
    color: #999;
    font-size: 0.85rem;
}

/* ============================================
   Shop Toolbar
   ============================================ */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.product-count {
    color: #666;
    font-size: 0.95rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #666;
    transition: all 0.2s;
}

.view-btn:hover,
.view-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Sort Dropdown */
.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-dropdown label {
    color: #666;
    font-size: 0.95rem;
    white-space: nowrap;
}

.sort-dropdown select {
    padding: 8px 35px 8px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    appearance: none;
    cursor: pointer;
    min-width: 160px;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

.mobile-filter-btn:hover {
    border-color: var(--primary-color);
}

/* ============================================
   Active Filters
   ============================================ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--light-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
}

.active-filter-tag button {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.active-filter-tag button:hover {
    color: var(--accent-color);
}

/* ============================================
   Products Grid
   ============================================ */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.shop-products-grid.list-view {
    grid-template-columns: 1fr;
}

.shop-products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.shop-products-grid.list-view .product-image-wrapper {
    height: 200px;
}

.shop-products-grid.list-view .product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Product Card Enhancements */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.product-image-wrapper {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

/* Product Actions Overlay */
.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
}

.wishlist-btn.active {
    color: var(--accent-color);
}

.wishlist-btn.active:hover {
    background: var(--accent-color);
    color: white;
}

/* Product Info */
.product-info {
    padding: 20px;
}

.product-name-link {
    text-decoration: none;
    color: inherit;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.2s;
}

.product-name-link:hover .product-name {
    color: var(--primary-color);
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

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

.product-original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background: #e09520;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.no-products p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        border-radius: 0;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

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

/* Filter Overlay - hidden by default, shown on mobile */
.filter-overlay {
    display: none;
}

@media (max-width: 992px) {
    .filter-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .filter-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-filter-btn {
        display: flex;
    }

    body.filters-open {
        overflow: hidden;
    }
}

@media (max-width: 768px) {
    .shop-header h1 {
        font-size: 2rem;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-right {
        justify-content: space-between;
    }

    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-image-wrapper {
        height: 200px;
    }

    .product-info {
        padding: 15px;
    }

    .product-name {
        font-size: 1rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .add-to-cart-btn {
        padding: 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .shop-products-grid {
        grid-template-columns: 1fr;
    }

    .product-image-wrapper {
        height: 250px;
    }
}
