/* =================================== */
/* --- General & Base Styles --- */
/* =================================== */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
html, body {
    height: 100%; /* Make sure html and body can take full height */
}
body { 
    font-family: 'Cairo', sans-serif; 
    background-color: #ffffff; 
    color: #1a1a1a; 
    display: flex; /* <-- 1. Use Flexbox */
    flex-direction: column; /* <-- 2. Arrange items vertically */
    min-height: 100vh; /* <-- 3. Ensure body is at least full screen height */
}
/* This new rule tells the main content to grow and take up empty space */
main {
    flex-grow: 1; 
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }

/* =================================== */
/* --- Header Styles --- */
/* =================================== */
.main-header { padding: 20px 0; border-bottom: 1px solid #f0f0f0; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.header-left, .header-right { flex: 1; }
.header-center { text-align: center; }
.logo { font-size: 2.5rem; font-weight: bold; letter-spacing: 2px; text-decoration: none; color: #1a1a1a; }
.header-left { display: flex; justify-content: flex-start; }
.header-right { display: flex; justify-content: flex-end; }
.icon { font-size: 1.5rem; color: #1a1a1a; cursor: pointer; }
.search-container { position: relative; }
.search-form { display: none; position: absolute; top: 150%; right: -20px; width: 250px; background: #fff; padding: 10px; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); z-index: 10; }
.search-form input { width: calc(100% - 70px); border: 1px solid #ccc; padding: 8px; border-radius: 4px; }
.search-form button { width: 60px; border: none; background: #c59d5f; color: #fff; padding: 8px 12px; border-radius: 4px; cursor: pointer; }
.secondary-nav { background-color: #fff; border-bottom: 1px solid #f0f0f0; padding: 10px 0; text-align: center; }
.secondary-nav a { text-decoration: none; color: #333; font-size: 1.1rem; font-weight: bold; margin: 0 20px; padding: 5px 0; position: relative; transition: color 0.3s ease; }
.secondary-nav a:hover { color: #c59d5f; }
.secondary-nav a::after { content: ''; position: absolute; bottom: 0; right: 0; width: 0; height: 2px; background-color: #c59d5f; transition: width 0.3s ease; }
.secondary-nav a:hover::after { width: 100%; }

/* =================================== */
/* --- Main Content & Sections --- */
/* =================================== */
.hero-section { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.hero-section h1 { font-size: 4rem; margin-bottom: 30px; }
.btn-main { background-color: #000000; color: #ffffff; padding: 15px 40px; font-size: 1.2rem; font-weight: bold; border: 2px solid #000; border-radius: 5px; transition: all 0.3s ease; }
.btn-main:hover { background-color: #ffffff; color: #000000; }
.products-section { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; font-weight: bold; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; background-color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.product-image img { width: 100%; height: 350px; object-fit: cover; display: block; }
.product-info { padding: 20px; text-align: center; }
.product-name { font-size: 1.2rem; font-weight: bold; margin-bottom: 10px; color: #333; }
.product-price { font-size: 1.1rem; color: #000; font-weight: bold; margin-bottom: 15px; }
.btn-view { display: inline-block; background-color: #000; color: #fff; padding: 10px 25px; border-radius: 5px; text-decoration: none; transition: background-color 0.3s ease; }
.btn-view:hover { background-color: #333; }

/* =================================== */
/* --- Specific Page Styles --- */
/* =================================== */
/* Product Details Page */
.product-details-page { padding: 60px 0; }
.details-wrapper { display: flex; flex-wrap: wrap; gap: 50px; }
.product-details-image { flex: 1 1 400px; }
.product-details-image img { width: 100%; border-radius: 10px; border: 1px solid #eee; }
.product-details-info { flex: 1 1 500px; }
.product-details-info h1 { font-size: 2.8rem; margin-bottom: 15px; }
.product-details-info .price { font-size: 2rem; font-weight: bold; color: #000; margin-bottom: 25px; }
.product-details-info h3 { font-size: 1.5rem; margin-bottom: 10px; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }
.product-details-info .description { font-size: 1.1rem; line-height: 1.8; color: #555; }
.color-swatches { display: flex; gap: 10px; margin-top: 10px; }
.swatch { width: 35px; height: 35px; border-radius: 50%; cursor: pointer; border: 2px solid #eee; transition: transform 0.2s ease, border-color 0.2s ease; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { border-color: #000; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000; }
.size-buttons { display: flex; gap: 10px; margin-top: 10px; }
.size-btn { padding: 8px 15px; border: 2px solid #ddd; background-color: #fff; cursor: pointer; border-radius: 5px; font-weight: bold; transition: all 0.2s ease; }
.size-btn:hover { background-color: #f0f0f0; }
.size-btn.active { background-color: #000; color: #fff; border-color: #000; }

/* Cart Page */
.cart-page { padding: 60px 0; }
.cart-page h1 { text-align: center; font-size: 2.5rem; margin-bottom: 40px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 40px; }
.cart-table th, .cart-table td { border: 1px solid #eee; padding: 15px; text-align: center; }
.cart-table th { background-color: #f8f8f8; }
.product-cell { display: flex; align-items: center; gap: 15px; text-align: right; }
.product-cell img { width: 80px; height: 80px; object-fit: cover; }
.btn-remove { background: none; border: none; color: red; font-size: 1.5rem; cursor: pointer; }
.quantity-form { display: flex; align-items: center; justify-content: center; }
.quantity-input { width: 60px; text-align: center; padding: 5px; border: 1px solid #ddd; border-radius: 4px; }
.btn-update { background-color: #28a745; color: white; border: none; padding: 6px 10px; margin-right: 5px; border-radius: 4px; cursor: pointer; }
.cart-summary-simplified { width: 100%; max-width: 400px; margin-right: 0; margin-left: auto; padding-top: 20px; }
.cart-summary-simplified .summary-total { display: flex; justify-content: space-between; font-size: 1.3rem; margin-bottom: 20px; }
.cart-summary-simplified .btn-main { width: 100%; text-align: center; }

/* Checkout Page */
.checkout-page { padding: 60px 0; background-color: #f8f9fa; }
.checkout-wrapper { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: flex-start; }
.customer-details, .order-summary { background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.subsection-title { font-size: 1.2rem; margin-top: 30px; margin-bottom: 15px; }
.checkout-form .form-group { margin-bottom: 20px; }
.checkout-form .form-group label { display: block; margin-bottom: 8px; font-weight: bold; text-align: right; }
.checkout-form .form-group input, .checkout-form .form-group textarea { width: 100%; padding: 12px; border-radius: 5px; border: 1px solid #ccc; font-size: 1rem; font-family: 'Cairo', sans-serif; box-sizing: border-box; }
.address-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.summary-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid #eee; }
.summary-item:first-child { padding-top: 0; }
.summary-item-image { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; margin-left: 15px; }
.summary-item-info { flex-grow: 1; }
.item-name { font-weight: bold; }
.item-details { font-size: 0.9rem; color: #666; display: block; }
.item-price { font-weight: bold; white-space: nowrap; }
.coupon-checkout { padding: 20px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin: 20px 0; }
.coupon-checkout form { display: flex; gap: 10px; }
.coupon-checkout input { flex-grow: 1; padding: 10px; border: 1px solid #ddd; border-radius: 5px; }
.coupon-checkout button { padding: 10px 20px; border: none; background-color: #23282d; color: #fff; border-radius: 5px; cursor: pointer; }
.message { text-align: center; padding: 10px; margin-top: 15px; border-radius: 5px; }
.coupon-message { margin-top: 10px; padding: 10px; border-radius: 5px; }
.coupon-message.error, .message.error { background-color: #f8d7da; color: #721c24; }
.coupon-message.success, .message.success { background-color: #d4edda; color: #155724; }
.calculation-summary .summary-line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 1rem; }
.calculation-summary .summary-line.discount { color: #28a745; }
.calculation-summary .summary-line.discount a { color: #dc3545; text-decoration: none; font-weight: bold; }
.calculation-summary .summary-total { display: flex; justify-content: space-between; font-size: 1.3rem; font-weight: bold; padding-top: 15px; margin-top: 10px; border-top: 2px solid #000; }

/* Category Filters */
.category-filters { padding: 30px 0; background-color: #f8f9fa; border-bottom: 1px solid #eee; text-align: center; }
.category-filters a { text-decoration: none; color: #333; background-color: #fff; border: 1px solid #ddd; padding: 10px 20px; margin: 5px; border-radius: 20px; display: inline-block; transition: all 0.3s ease; font-weight: bold; }
.category-filters a:hover { background-color: #eee; border-color: #ccc; }
.category-filters a.active { background-color: #23282d; color: #fff; border-color: #23282d; }

/* =================================== */
/* --- Footer Styles --- */
/* =================================== */
.main-footer { background-color: #000000; color: #ffffff; padding: 40px 0; text-align: center; }
.social-icons { margin-bottom: 20px; }
.social-icons a { font-size: 1.8rem; margin: 0 15px; transition: color 0.3s ease; }
.social-icons a:hover { color: #cccccc; }
.tagline { margin-bottom: 20px; font-style: italic; }
.copyright { font-size: 0.9rem; color: #a0a0a0; }


/* =================================== */
/* --- Responsive Media Queries --- */
/* =================================== */
@media (max-width: 1080px) { .checkout-wrapper { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    .logo { font-size: 2rem; }
    .secondary-nav a { margin: 0 10px; font-size: 1rem; }
    .hero-section h1, .products-page .page-main-title { font-size: 2.5rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .details-wrapper { flex-direction: column; }
    .product-details-info h1 { font-size: 2rem; }
    .cart-table thead { display: none; }
    .cart-table tr { display: block; margin-bottom: 20px; border: 1px solid #ddd; }
    .cart-table td { display: block; text-align: right; border-bottom: 1px solid #eee; position: relative; padding-right: 50%; }
    .cart-table td:before { content: attr(data-label); position: absolute; right: 10px; width: 45%; padding-left: 10px; font-weight: bold; text-align: right; }
    .product-cell { justify-content: flex-end; }
}
@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .category-filters a { padding: 8px 15px; font-size: 0.9rem; }
    .secondary-nav { overflow-x: auto; white-space: nowrap; }
    .address-grid { grid-template-columns: 1fr; }
}

/* --- New Contact Page Styles --- */
.contact-page {
    padding: 60px 0;
}
.contact-page h1 {
    text-align: center;
    font-size: 2.5rem;
}
.contact-page > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 50px;
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: flex-start;
}
.contact-info, .contact-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.contact-info h3, .contact-form-container h3 {
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 25px;
}
.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}
.info-item i {
    font-size: 1.8rem;
    color: #c59d5f;
    margin-left: 20px;
    margin-top: 5px;
}
.info-item h4 {
    margin: 0 0 5px 0;
}
.info-item p {
    margin: 0;
    color: #555;
}
.social-icons-contact a {
    font-size: 1.5rem;
    margin-left: 15px;
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
.contact-form .form-group input,
.contact-form .form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}



