/* ==========================================
   Products Page Specific Styles
   ========================================== */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.938rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Products Main Area */
.products-main {
    min-height: 600px;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.products-header p {
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.sort-options select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.938rem;
    cursor: pointer;
    background: white;
    outline: none;
}

.sort-options select:focus {
    border-color: var(--primary-color);
}

/* ==========================================
   Cart Page Styles
   ========================================== */
.cart-page {
    padding: 3rem 0;
    min-height: 60vh;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin-bottom: 2rem;
}

/* Cart Items */
.cart-items {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.cart-item:hover {
    box-shadow: var(--shadow-sm);
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cart-item-category {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1.125rem;
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.quantity-display {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.remove-btn {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.938rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.remove-btn:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-cart h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Order Summary */
.order-summary {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.order-summary h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.summary-details {
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-row span:first-child {
    color: var(--text-secondary);
}

.summary-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-total span:last-child {
    color: var(--primary-color);
}

.promo-code {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.promo-code input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.938rem;
    outline: none;
}

.promo-code input:focus {
    border-color: var(--primary-color);
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.support-message {
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.1) 0%, rgba(45, 95, 63, 0.05) 100%);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.support-message p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.continue-shopping {
    text-align: center;
    margin-top: 2rem;
}

/* ==========================================
   Checkout Modal
   ========================================== */
.checkout-modal {
    max-width: 600px;
    text-align: center;
}

.success-animation {
    margin-bottom: 2rem;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    animation: scaleIn 0.5s ease;
}

.checkout-modal h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.checkout-modal p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.order-details {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    text-align: left;
}

.order-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.order-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--primary-color);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================
   Loading & No Results States
   ========================================== */
.loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-results p {
    color: var(--text-secondary);
}

/* ==========================================
   Responsive Media Queries
   ========================================== */

/* Medium Tablet (900px and below) */
@media (max-width: 900px) {
    .hero-content {
        gap: 3rem;
    }
    
    .hero-image {
        height: 450px;
    }
    
    .floating-card {
        max-width: 190px;
        padding: 1.5rem;
    }
    
    .card-1 {
        top: 8%;
        right: 10%;
    }
    
    .card-2 {
        top: 48%;
        left: 2%;
    }
    
    .card-3 {
        bottom: 8%;
        right: 8%;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .container {
        padding: 0 1.5rem;
    }
    
    /* Navigation */
    .navbar .container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        gap: 1rem;
        font-size: 0.875rem;
    }
    
    .search-box input {
        width: 150px;
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text h2 {
        font-size: 2.5rem;
    }
    
    .hero-image {
        height: 400px;
        margin-top: 2rem;
    }
    
    .floating-card {
        padding: 1.25rem 1.5rem;
        max-width: 180px;
    }
    
    .card-1 {
        top: 0;
        right: 5%;
    }
    
    .card-2 {
        top: 35%;
        left: -5%;
    }
    
    .card-3 {
        bottom: 10%;
        right: 0;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Products Layout */
    .products-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    /* Cart Layout */
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
    
    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 1rem;
    }
    
    /* Modal */
    .modal-product {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .modal-product-image {
        height: 300px;
    }
    
    /* About Section */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Impact Grid */
    .impact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    /* Navigation */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    
    .nav-actions {
        flex-wrap: wrap;
    }
    
    .search-box {
        width: 100%;
        order: 3;
        flex-basis: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    /* Hero */
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-image {
        height: 350px;
        margin-top: 1.5rem;
    }
    
    .floating-card {
        padding: 1rem 1.25rem;
        max-width: 140px;
    }
    
    .floating-card .icon {
        font-size: 2rem;
    }
    
    .floating-card h4 {
        font-size: 1rem;
    }
    
    .floating-card p {
        font-size: 0.75rem;
    }
    
    .card-1 {
        top: 5%;
        right: 0;
    }
    
    .card-2 {
        top: 40%;
        left: -10%;
    }
    
    .card-3 {
        bottom: 5%;
        right: -5%;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .sort-options select {
        width: 100%;
    }
    
    /* Cart */
    .cart-item {
        grid-template-columns: 80px 1fr;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-name {
        font-size: 1.125rem;
    }
    
    .promo-code {
        flex-direction: column;
    }
    
    /* Stats */
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .hero-image {
        height: 320px;
    }
    
    .floating-card {
        padding: 0.875rem 1rem;
        max-width: 120px;
    }
    
    .floating-card .icon {
        font-size: 1.75rem;
    }
    
    .floating-card h4 {
        font-size: 0.938rem;
    }
    
    .floating-card p {
        font-size: 0.688rem;
    }
    
    .card-1 {
        top: 2%;
        right: -2%;
    }
    
    .card-2 {
        top: 42%;
        left: -12%;
    }
    
    .card-3 {
        bottom: 2%;
        right: -8%;
    }
    
    .hero-text h2 {
        font-size: 1.75rem;
    }
}