/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Header & Section Titles */
h1, h2 {
    text-align: center;
    color: #5C5C5C;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Section Styling */
section {
    padding: 40px 20px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 900px;
}

/* Video Section */
#video-section {
    text-align: center;
}

#product-video {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 20px auto;
}


/* === Products Gallery Section (MODIFIED FOR RESPONSIVE GRID) === */
.products-section {
    padding: 20px 10px; /* Reduced padding slightly for mobile */
    background-color: #fff;
    border-radius: 8px;
    margin-top: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* --- THIS IS THE KEY CHANGE FOR MOBILE & DESKTOP VIEW --- */
/* --- নতুন লেআউট কোড --- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.product-card {
    background-color: #fefefe;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* এই অংশটি প্রতিটি কার্ডকে সব ডিভাইসের জন্য রেসপন্সিভ করে */
    flex-basis: 160px; 
    flex-grow: 1;      
    max-width: 250px; 
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.product-card img {
    max-width: 100%;
    height: auto;
    /* aspect-ratio দিয়ে সব ছবির আকার সমান রাখা হলো */
    aspect-ratio: 1 / 1; 
    object-fit: cover; /* ছবি যেন ফ্রেমের সাথে ফিট হয়ে যায় */
    border-radius: 8px;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 1rem; /* মোবাইল ভিউ এর জন্য সাইজ ঠিক করা হলো */
    margin: 5px 0;
    color: #444;
}

.product-card p {
    font-size: 0.95rem; /* মোবাইল ভিউ এর জন্য সাইজ ঠিক করা হলো */
    color: #e67e22;
    font-weight: bold;
    margin-bottom: 15px;
}

.product-card p del {
    color: #888;
    font-weight: normal;
    font-size: 0.9em;
    margin-left: 5px;
}

.button {
    display: inline-block;
    background-color: #ff6347;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.button:hover {
    background-color: #e5533d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}


/* Product Description Section */
#description-section ul {
    list-style: none;
    padding: 0;
}

#description-section ul li {
    background: #e9e9e9;
    margin-bottom: 10px;
    padding: 10px;
    border-left: 5px solid #FF6B6B;
    border-radius: 4px;
}

/* Size Chart Section (Table) */
.size-chart-section {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 50px auto;
    text-align: center;
    background-color: #fcfcfc;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.size-chart-section h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
    display: inline-block;
}

.size-chart-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    height: 3px;
    width: 50px;
    background-color: #f39c12;
}


.table-container {
    overflow-x: auto;
    width: 100%;
}

.size-chart-section table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 1rem;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.size-chart-section th,
.size-chart-section td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.size-chart-section thead th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.size-chart-section tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.size-chart-section tbody tr:hover {
    background-color: #e9e9e9;
    cursor: default;
}

.size-chart-section table thead tr th:first-child {
    border-top-left-radius: 8px;
}
.size-chart-section table thead tr th:last-child {
    border-top-right-radius: 8px;
}
.size-chart-section table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 8px;
}
.size-chart-section table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 8px;
}


.size-chart-section .note {
    font-size: 0.95rem;
    color: #555;
    margin-top: 30px;
    line-height: 1.6;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-left: 5px solid #ffc107;
    padding: 15px 20px;
    border-radius: 5px;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.size-chart-section .note strong {
    color: #e0a800;
}


/* Form styles inside the modal */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}


label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #34495e;
    font-size: 1rem;
}

input,
textarea,
select {
    font-family: 'Arial', sans-serif;
    font-size: 1rem;
    color: #333;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #c9d2d8;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="#2c3e50" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    cursor: pointer;
}

.delivery-info {
    background-color: #eaf6fd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #c9e2f4;
    margin-top: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.delivery-info h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.delivery-info p {
    font-size: 1rem;
    color: #444;
    margin: 5px 0;
}

.delivery-info span {
    font-weight: bold;
    color: #f39c12;
}

.form-container .button {
    background-color: #28a745;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%; /* Full width button in modal */
    margin-top: 15px;
}

.form-container .button:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}


/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 40px;
}

/* ====== MODAL STYLES ====== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    padding: 10px; /* Padding for small screens */
    box-sizing: border-box;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    width: 100%;
    max-width: 600px; /* Reduced max-width for better fit */
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: #333;
    text-decoration: none;
}

.modal-content h2 {
    color: #333;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Product Color Options in Modal */
.product-color-options {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    text-align: center;
}

.product-color-options p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
}

.color-image-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.color-option {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.color-option.selected {
    border-color: #ff6347;
    transform: scale(1.05);
}

.color-option img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 5px;
}

.color-option span {
    font-size: 0.8rem;
    color: #333;
    font-weight: bold;
}


/* ====== RESPONSIVE DESIGN - MEDIA QUERIES ====== */

/* Removing specific grid changes from media queries as auto-fit handles it now */

@media (max-width: 768px) {
    .form-row {
        flex-direction: column; /* Stack form groups vertically */
        gap: 0;
        margin-bottom: 0;
    }
    .form-row .form-group {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    section {
        padding: 20px 15px;
        margin: 10px auto;
    }
    h1, h2 {
        font-size: 1.6rem;
    }
    .modal-content {
        padding: 20px;
    }
     .modal-content h2 {
        font-size: 1.4rem;
    }
}