/* Catalog Page Specific Styles */

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Catalog Hero Section */
.catalog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.catalog-hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, #f0f0f0, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.catalog-hero p {
    font-size: 1.4rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Catalog Filters */
.catalog-filters {
    margin-top: 2rem;
    position: relative;
    z-index: 10;
    padding: 0 2rem 3rem;
    overflow-x: hidden;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 3rem;
    max-width: 100%;
    box-sizing: border-box;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.filter-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border: 2px solid rgba(102, 126, 234, 0.2);
    padding: 1.2rem 2.5rem;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    z-index: 0;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn:hover::after {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25), 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.5);
    color: #1a202c;
}

.filter-btn.active {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 50%, #5856d6 100%);
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 60px rgba(102, 126, 234, 0.4), 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.filter-btn.active::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.filter-btn.active::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.sort-options {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

#sort-select {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border: 2px solid rgba(102, 126, 234, 0.2);
    padding: 1.2rem 2.5rem;
    border-radius: 60px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    min-width: 280px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    overflow: hidden;
}

#sort-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.2), transparent);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

#sort-select:hover::before {
    left: 100%;
}

#sort-select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.25), 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px) scale(1.02);
    color: #1a202c;
}

#sort-select:hover {
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 45px rgba(102, 126, 234, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    color: #1a202c;
}

#sort-select option {
    background: white;
    color: #2c3e50;
    font-weight: 600;
    padding: 0.5rem;
}

/* Product Grid */
.catalog-products {
    padding: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    justify-items: center;
}

.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
    width: 100%;
    max-width: 380px;
    height: auto;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover {
    transform: translateY(-15px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 25px 80px rgba(102, 126, 234, 0.2);
}

.product-image {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
    z-index: 2;
    position: relative;
}

.product-card:hover .product-image img {
    transform: scale(1.1) rotateY(10deg);
    filter: drop-shadow(0 15px 40px rgba(102, 126, 234, 0.3));
}

.product-image::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(0deg);
    transition: all 0.8s ease;
    opacity: 0;
}

.product-card:hover .product-image::before {
    opacity: 1;
    transform: rotate(360deg);
}

.product-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-badge.new {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    animation: pulse 2s infinite;
}

.product-badge.sale {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.product-info {
    padding: 2rem;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-details {
    flex: 1;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1d1d1f;
    background: linear-gradient(135deg, #1d1d1f, #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-storage {
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    display: inline-block;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.product-price {
    margin-bottom: 1.5rem;
}

.product-price .price {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.add-to-cart-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1.2rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.add-to-cart-btn::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.6s ease;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.add-to-cart-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
}

.product-badge.new {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.product-badge.sale {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6e6e73;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1d1d1f;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.empty-state .btn-primary {
    display: inline-block;
    width: auto;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e5e5e7;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Catalog */
/* Large tablets */
@media (max-width: 1024px) {
    .catalog-hero {
        padding: 5rem 2rem 4rem;
    }
    
    .catalog-hero h1 {
        font-size: 3.5rem;
        line-height: 1.2;
    }
    
    .catalog-hero p {
        font-size: 1.3rem;
        margin-bottom: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
        padding: 0 2rem;
    }
    
    .catalog-filters {
        padding: 0 2rem 2rem;
    }
    
    .filters {
        gap: 1rem;
        padding: 2rem;
    }
    
    .filter-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    #sort-select {
        min-width: 280px;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .product-card {
        transition: all 0.3s ease;
    }
    
    .product-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Tablet portrait and mobile landscape */
@media (max-width: 768px) {
    .catalog-hero {
        padding: 4rem 1.5rem 3rem;
        text-align: center;
    }
    
    .catalog-hero h1 {
        font-size: 3rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .catalog-hero p {
        font-size: 1.2rem;
        line-height: 1.5;
        margin-bottom: 2rem;
    }
    
    .catalog-products {
        padding: 2rem 0;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
        justify-items: center;
    }
    
    .product-card {
        max-width: 350px;
    }
    
    .catalog-filters {
        margin-top: -2rem;
        padding: 0 1rem 2rem;
        overflow-x: hidden;
    }
    
    .filters {
        gap: 0.75rem;
        justify-content: center;
        max-width: 100%;
        padding: 1.5rem;
        border-radius: 20px;
        flex-wrap: wrap;
    }
    
    .filter-btn {
        padding: 1rem 1.8rem;
        font-size: 0.9rem;
        flex: 0 1 auto;
        min-width: 0;
        white-space: nowrap;
        border-radius: 50px;
        letter-spacing: 0.5px;
        transition: all 0.3s ease;
    }
    
    .filter-btn:hover {
        transform: translateY(-3px) scale(1.05);
    }
    
    .filter-btn.active {
        transform: translateY(-2px);
    }
    
    #sort-select {
        min-width: 240px;
        padding: 1rem 2rem;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.95rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .catalog-hero h1 {
        font-size: 2.5rem;
    }
    
    .catalog-hero p {
        font-size: 1.1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .product-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .filters {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }
    
    #sort-select {
        min-width: 200px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        border-radius: 50px;
        margin-top: 1rem;
    }
    
    .product-card {
        border-radius: 20px;
        overflow: hidden;
    }
    
    .product-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .product-info {
        padding: 1.5rem;
    }
    
    .product-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    
    .product-price .price {
        font-size: 1.4rem;
    }
    
    .add-to-cart-btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        border-radius: 12px;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .catalog-hero {
        padding: 3rem 1rem 2rem;
    }
    
    .catalog-hero h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }
    
    .catalog-hero p {
        font-size: 1.1rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    
    .catalog-products {
        padding: 1rem 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0 1rem;
    }
    
    .catalog-filters {
        margin-top: -1.5rem;
        padding: 0 1rem 1.5rem;
    }
    
    .filters {
        padding: 1.2rem;
        gap: 0.6rem;
        border-radius: 16px;
    }
    
    .filter-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
        border-radius: 25px;
        min-width: auto;
    }
    
    .filter-btn:hover {
        transform: translateY(-2px) scale(1.03);
    }
    
    #sort-select {
        width: 100%;
        min-width: auto;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
        margin-top: 1rem;
        border-radius: 25px;
    }
    
    .product-card {
        border-radius: 16px;
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .product-card:hover {
        transform: translateY(-6px);
    }
    
    .product-info {
        padding: 1.2rem;
    }
    
    .product-title {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .product-price .price {
        font-size: 1.3rem;
    }
    
    .add-to-cart-btn {
        padding: 1rem;
        font-size: 0.9rem;
        width: 100%;
        border-radius: 10px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .catalog-hero {
        padding: 2.5rem 0.8rem 1.5rem;
    }
    
    .catalog-hero h1 {
        font-size: 2.2rem;
    }
    
    .catalog-hero p {
        font-size: 1rem;
    }
    
    .products-grid {
        padding: 0 0.8rem;
        gap: 1rem;
    }
    
    .catalog-filters {
        padding: 0 0.8rem 1.2rem;
    }
    
    .filters {
        padding: 1rem;
    }
    
    .filter-btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.8rem;
    }
    
    #sort-select {
        padding: 0.9rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .product-info {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1rem;
    }
    
    .product-price .price {
        font-size: 1.2rem;
    }
    
    .add-to-cart-btn {
         padding: 0.9rem;
         font-size: 0.85rem;
     }
}

/* Desktop styles */
@media (min-width: 1024px) {
    .product-title {
        font-size: 1.3rem;
    }
    
    .product-price .price {
        font-size: 1.6rem;
    }
    
    .add-to-cart-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Cart Modal Styles */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-modal.show {
    display: block;
    opacity: 1;
    animation: modalSlideIn 0.3s ease;
}

.cart-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.cart-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cart-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cart-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.cart-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cart-modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Cart Modal Responsive Styles */
@media (max-width: 1024px) {
    .cart-modal-content {
        width: 90%;
        max-width: 500px;
    }
    
    .cart-modal-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .cart-modal-content {
        width: 95%;
        max-width: none;
        margin: 1rem auto;
        max-height: 90vh;
    }
    
    .cart-modal-header {
        padding: 1.2rem;
    }
    
    .cart-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .cart-modal-body {
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .cart-modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .cart-modal-header {
        padding: 1rem;
        border-radius: 0;
    }
    
    .cart-header h2 {
        font-size: 1.2rem;
    }
    
    .close-cart {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .cart-content {
        padding: 0 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0;
        gap: 0.8rem;
    }
    
    .cart-item-info {
        width: 100%;
    }
    
    .cart-item-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .quantity-btn {
        width: 40px;
        height: 40px;
    }
    
    .quantity-display {
        font-size: 1.2rem;
        min-width: 50px;
    }
    
    .remove-btn {
        padding: 0.7rem 1.2rem;
    }
    
    .cart-footer {
        padding: 1rem;
        border-radius: 0;
    }
    
    .checkout-btn {
        padding: 1.2rem;
        font-size: 1rem;
    }
}

@media (max-width: 360px) {
    .cart-header h2 {
        font-size: 1.1rem;
    }
    
    .cart-item-info h4 {
        font-size: 0.9rem;
    }
    
    .cart-item-price {
        font-size: 0.9rem;
    }
    
    .cart-total {
        font-size: 1rem;
    }
    
    .checkout-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.cart-item-details {
    font-size: 0.9rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: #1d1d1f;
    font-size: 1.1rem;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.remove-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.remove-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.cart-empty p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cart-modal-footer {
    padding: 1.5rem 2rem 2rem;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    background: rgba(248, 250, 252, 0.8);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.total-label {
    color: #1d1d1f;
}

.total-price {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
}

.cart-actions .btn-secondary,
.cart-actions .btn-primary {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.cart-actions .btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.cart-actions .btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.cart-actions .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.cart-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile styles for cart modal */
@media (max-width: 768px) {
    .cart-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .cart-modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .cart-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .cart-modal-body {
        padding: 1.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cart-item-controls {
        align-self: flex-end;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .cart-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
    }
}