/* 
 * ZAPBOOTS - Premium Footwear Store
 * Shop Page Stylesheet
 */

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Shop Hero Section */
.shop-hero {
    min-height: 60vh;
    padding: 140px 0 80px;
    background-image: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 250, 0.85) 100%),
        radial-gradient(circle at 30% 40%, rgba(var(--primary-color-rgb), 0.2) 0%, transparent 350px),
        radial-gradient(circle at 70% 60%, rgba(var(--accent-color-rgb), 0.15) 0%, transparent 350px);
    position: relative;
    overflow: hidden;
}

.shop-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/pattern-bg.svg');
    background-size: 300px;
    background-repeat: repeat;
    opacity: 0.1;
    z-index: 1;
    animation: subtle-move 20s infinite alternate ease-in-out;
}

.shop-hero::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 80%;
    height: 80%;
    background: radial-gradient(ellipse at center, rgba(var(--secondary-color-rgb), 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    animation: gentle-pulse 15s infinite alternate ease-in-out;
}

@keyframes subtle-move {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-10px) translateY(-10px); }
}

@keyframes gentle-pulse {
    0% { opacity: 0.05; transform: scale(1); }
    100% { opacity: 0.1; transform: scale(1.1); }
}

/* Shop Filters Section */
.shop-filters {
    padding: 30px 0;
    background-color: var(--gray-100);
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: var(--gray-700);
}

.filter-select {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--gray-800);
    font-family: var(--body-font);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.filter-btn {
    margin-left: auto;
}

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

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background-color: white;
    color: var(--gray-700);
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.page-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: white;
}

.page-link.next {
    background-color: var(--gray-100);
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cart Page Styles */
.cart-hero {
    min-height: 40vh;
    padding: 140px 0 80px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cart-hero h1 {
    font-size: 3rem;
    color: var(--heading-color);
}

.cart-items-section {
    padding: 60px 0;
}

.cart-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.cart-list {
    flex: 2;
    min-width: 300px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.cart-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.item-details {
    flex-grow: 1;
}

.item-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--heading-color);
}

.item-details p {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.quantity-controls button {
    background-color: var(--gray-200);
    border: none;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: background-color var(--transition-fast);
}

.quantity-controls button:hover {
    background-color: var(--gray-300);
}

.quantity-controls span {
    font-weight: 500;
    color: var(--heading-color);
}

.remove-item {
    background-color: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.remove-item:hover {
    background-color: var(--danger-dark);
}

.cart-summary {
    flex: 1;
    min-width: 280px;
    padding: 30px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: white;
    box-shadow: var(--shadow-sm);
}

.cart-summary h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--heading-color);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 15px;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-color);
}

.cart-summary h3 {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
    color: var(--heading-color);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    margin-top: 20px;
}

.checkout-btn:hover {
    background-color: var(--primary-dark);
}

/* Product Detail Page Styles */
.product-detail-hero {
    min-height: 40vh;
    padding: 140px 0 80px;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-detail-hero h1 {
    font-size: 3rem;
    color: var(--heading-color);
}

.product-details-section {
    padding: 60px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.product-image-gallery {
    flex: 1;
    min-width: 300px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.main-product-image {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 15px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px; /* For scrollbar */
}

.thumbnail-images img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.thumbnail-images img:hover,
.thumbnail-images img.active {
    border-color: var(--primary-color);
}

.product-info {
    flex: 1.5;
    min-width: 300px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.product-info h2 {
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.product-description {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 30px;
}

.product-options {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.size-selector label,
.quantity-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--heading-color);
}

.size-selector select,
.quantity-selector input {
    padding: 10px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--text-color);
    background-color: white;
    transition: border-color var(--transition-fast);
}

.size-selector select:focus,
.quantity-selector input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.add-to-cart-btn:hover {
    background-color: var(--primary-dark);
}

.related-products {
    padding: 60px 0;
    background-color: var(--light-gray);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.related-products h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--heading-color);
    margin-bottom: 40px;
}

.related-products .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Responsive Styles */
@media (max-width: 991px) {
    .filters-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-btn {
        margin-left: 0;
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
    
    /* Category section in shop page */
    .category-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Category section in shop page */
    .category-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .category-card {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        animation: fadeInUp 0.5s ease-out forwards;
        border-radius: 10px;
        overflow: hidden;
    }
    
    .category-img {
        width: 100%;
        height: 250px;
    }
    
    .category-content {
        padding: 20px;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cart-hero h1 {
        font-size: 1.4rem;
        white-space: normal;
        overflow: visible;
    }
    
    .product-detail-hero h1 {
        font-size: 1.4rem;
        white-space: normal;
        overflow: visible;
    }
    
    .product-info h2 {
        font-size: 1.2rem;
        white-space: normal;
        overflow: visible;
    }
    
    .related-products h2 {
        font-size: 1.2rem;
        white-space: normal;
        overflow: visible;
    }
    
    .item-details h3 {
        font-size: 0.9rem;
        white-space: normal;
        overflow: visible;
    }
    
    .cart-summary h2 {
        font-size: 1.1rem;
        white-space: normal;
        overflow: visible;
    }
    
    .cart-summary h3 {
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .cart-hero h1 {
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
    }
    
    .product-detail-hero h1 {
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
    }
    
    .product-info h2 {
        font-size: 0.95rem;
        white-space: normal;
        overflow: visible;
    }
    
    .related-products h2 {
        font-size: 0.95rem;
        white-space: normal;
        overflow: visible;
    }
    
    .item-details h3 {
        font-size: 0.75rem;
        white-space: normal;
        overflow: visible;
    }
    
    .cart-summary h2 {
        font-size: 0.9rem;
        white-space: normal;
        overflow: visible;
    }
    
    .cart-summary h3 {
        font-size: 0.8rem;
        white-space: normal;
        overflow: visible;
    }
}