/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #011b38;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
}

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

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.logo p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-actions button {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-dark);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.header-actions button:hover {
    color: var(--primary-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.menu-toggle {
    display: none;
}

/* Search Bar */
.search-bar {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
}

.search-bar.active {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #034078);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s, box-shadow 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Filter Section */
.filter-section {
    background: var(--bg-white);
    padding: 2rem 0;
    margin-top: 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 800;
}

.filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-family: 'Tajawal', sans-serif;
}

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

.sort-options {
    text-align: center;
}

.sort-options select {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

/* Products Section */
.products-section {
    padding: 3rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 800px;
    overflow: hidden;
    background: var(--bg-light);
}

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

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

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-badge.out-of-stock {
    background: var(--danger-color);
}

.product-colors {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-dot {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-dot:hover {
    transform: scale(1.2);
}

.product-info {
    padding: 1.2rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-category {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.old-price {
    font-size: 1rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.btn-add-cart:hover {
    background: #023a6b;
}

.btn-view {
    background: var(--bg-light);
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-view:hover {
    background: var(--border-color);
}

/* Loading and No Products */
.loading,
.no-products {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading i,
.no-products i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    left: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    transition: left 0.3s;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

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

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

.cart-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.cart-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

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

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-details {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
}

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

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.cart-item-qty {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-weight: 600;
}

.btn-remove {
    margin-right: auto;
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.cart-total strong {
    color: var(--primary-color);
}

.btn-checkout {
    width: 100%;
    background: var(--success-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.btn-checkout:hover {
    background: #229954;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 10;
}

/* Product Modal Grid */
.product-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.product-modal-image-container {
    width: 100%;
}

.product-modal-image {
    width: 100%;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.product-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-gallery {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-image-gallery img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    background: var(--bg-light);
}

.product-image-gallery img:hover {
    border-color: var(--primary-color);
}

.product-modal-details {
    display: flex;
    flex-direction: column;
}

/* About Section */
.about-section {
    background: var(--bg-white);
    padding: 4rem 0;
    margin: 3rem 0;
}

.about-text {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    transition: all 0.3s;
}

.feature:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.feature i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    font-family: 'Tajawal', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.info-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--text-dark);
}

.info-item p {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s;
    z-index: 1000;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* Checkout Modal */
.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3500;
    overflow-y: auto;
    padding: 2rem;
}

.checkout-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.checkout-modal-content {
    background: white;
    border-radius: 15px;
    max-width: 1000px;
    width: 100%;
    margin: 2rem auto;
    box-shadow: var(--shadow-lg);
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-light);
    border-radius: 15px 15px 0 0;
}

.checkout-header h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-body {
    padding: 2rem;
}

/* Order Summary */
.order-summary {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.order-summary h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.checkout-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

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

.checkout-item-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.checkout-item-qty {
    font-size: 0.9rem;
    color: var(--text-light);
}

.checkout-item-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.checkout-total strong {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Checkout Form */
.checkout-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.required {
    color: var(--danger-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.9rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Payment Method */
.payment-method {
    margin: 2rem 0;
}

.payment-method h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.payment-option {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.payment-option.selected {
    border-color: var(--success-color);
    background: #d4edda;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    margin: 0;
}

.payment-option label i {
    font-size: 2rem;
    color: var(--success-color);
}

.payment-option label span {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.payment-option label small {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Checkout Actions */
.checkout-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.btn-secondary {
    flex: 1;
    background: var(--text-light);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: #6c757d;
}

.btn-confirm-order {
    flex: 2;
    background: var(--success-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-confirm-order:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */

/* Large Tablets and Small Desktops - 1024px */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }

    .checkout-modal-content {
        max-width: 90%;
    }
}

/* Tablets - 768px */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .nav-menu {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    /* Header adjustments */
    .logo h1 {
        font-size: 1.5rem;
    }

    .logo p {
        font-size: 0.8rem;
    }

    /* Products grid - 2 columns */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Product card adjustments */
    .product-card {
        padding: 0.8rem;
    }

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

    /* Hero section */
    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* Cart sidebar */
    .cart-sidebar {
        width: 320px;
    }

    /* Checkout modal */
    .checkout-modal {
        padding: 1rem;
    }

    .checkout-modal-content {
        max-width: 95%;
        margin: 1rem auto;
    }

    .checkout-body {
        padding: 1.5rem;
    }

    .checkout-header h2 {
        font-size: 1.5rem;
    }

    /* Form layout - stack columns */
    .form-row {
        grid-template-columns: 1fr !important;
    }

    /* Section titles */
    .section-title {
        font-size: 1.8rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-width: 95%;
    }

    /* Product modal grid - stack to single column */
    .product-modal-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    /* Product modal image */
    .product-modal-image {
        height: 350px;
    }

    /* Image gallery thumbnails */
    .product-image-gallery img {
        width: 70px;
        height: 70px;
    }

    /* Stats grid */
    .features {
        grid-template-columns: 1fr;
    }
}

/* Mobile Phones - 480px */
@media (max-width: 480px) {
    /* Typography - prevent zoom on input focus */
    body {
        font-size: 16px;
    }

    input, select, textarea {
        font-size: 16px !important;
    }

    /* Header */
    .header-content {
        padding: 0.8rem 0;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .logo p {
        display: none;
    }

    .header-actions button {
        font-size: 1.2rem;
    }

    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    /* Hero */
    .hero {
        min-height: 250px;
        padding: 2rem 1rem;
    }

    .hero-content h2 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .btn-primary {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Products grid - 1 column for very small screens */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-card {
        padding: 1rem;
    }

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

    /* Touch targets - minimum 44px */
    button, .btn, a.btn {
        min-height: 44px;
        min-width: 44px;
    }

    .product-actions button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }

    /* Cart sidebar - full width */
    .cart-sidebar {
        width: 100%;
        left: -100%;
    }

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

    .cart-item-actions button {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem;
    }

    /* Checkout modal - full screen on mobile */
    .checkout-modal {
        padding: 0;
    }

    .checkout-modal-content {
        max-width: 100%;
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .checkout-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: var(--bg-light);
        z-index: 10;
    }

    .checkout-header h2 {
        font-size: 1.2rem;
    }

    .checkout-body {
        padding: 1rem;
    }

    .order-summary {
        padding: 1rem;
    }

    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .checkout-item img {
        width: 100%;
        height: auto;
        max-width: 150px;
    }

    /* Forms */
    .checkout-form h3 {
        font-size: 1.1rem;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 16px;
    }

    .checkout-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .checkout-actions button {
        width: 100%;
        padding: 1rem;
    }

    /* Product Modal */
    .modal {
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .modal-close {
        top: 1rem;
        left: 1rem;
        width: 44px;
        height: 44px;
    }

    /* Product modal grid - full width on mobile */
    .product-modal-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    /* Product modal image - responsive height */
    .product-modal-image {
        height: 300px;
        min-height: 250px;
        max-height: 350px;
    }

    /* Image gallery - smaller thumbnails on mobile */
    .product-image-gallery {
        gap: 0.4rem;
    }

    .product-image-gallery img {
        width: 60px;
        height: 60px;
    }

    /* Product card image on homepage - optimized for mobile */
    .product-image {
        height: 600px;
    }

    /* Filters */
    .filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .sort-options select {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    /* Contact form */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Footer */
    .footer-section h3,
    .footer-section h4 {
        font-size: 1.1rem;
    }

    .footer-section {
        margin-bottom: 1.5rem;
    }

    /* Back to top button */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1.1rem;
    }

    /* Section titles */
    .section-title {
        font-size: 1.5rem;
    }

    /* About section */
    .about-content {
        padding: 1rem;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Small Mobile Phones - 320px */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }

    .logo h1 {
        font-size: 1.1rem;
    }

    .hero-content h2 {
        font-size: 1.4rem;
    }

    .product-card {
        padding: 0.8rem;
    }

    .checkout-header h2 {
        font-size: 1rem;
    }

    .cart-sidebar {
        width: 100%;
    }

    /* Product modal adjustments for very small screens */
    .product-modal-grid {
        padding: 0.8rem;
    }

    .product-modal-image {
        height: 250px;
        min-height: 200px;
    }

    .product-image-gallery img {
        width: 50px;
        height: 50px;
    }

    .product-image {
        height: 550px;
    }
}

    .footer-content {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .product-image {
        height: 200px;
    }

    .filter-btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    /* Checkout Modal Responsive */
    .checkout-modal {
        padding: 1rem;
    }

    .checkout-modal-content {
        margin: 1rem auto;
    }

    .checkout-header {
        padding: 1rem;
    }

    .checkout-header h2 {
        font-size: 1.3rem;
    }

    .checkout-body {
        padding: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .checkout-actions {
        flex-direction: column;
    }

    .checkout-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
