/* Global Styles */
:root {
    --primary-color: #f8b3cb;
    --secondary-color: #a4d8f8;
    --accent-color: #ff6b8b;
    --text-color: #333;
    --light-text: #666;
    --white: #fff;
    --bg-color: #f9f9f9;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 750px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 970px;
    }
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 10px 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    margin-bottom: 10px;
}

.logo h1 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.logo p {
    color: var(--white);
    font-size: 1rem;
    opacity: 0.9;
}

/* Countdown Timer */
.timer-container {
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: var(--border-radius);
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.discount-banner {
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.flash-icon {
    display: inline-block;
    margin-left: 5px;
    animation: flash 1s infinite;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.time-block {
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-block span:first-child {
    font-size: 1.2rem;
    font-weight: bold;
}

.time-block .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Product Gallery */
.product-gallery {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.gallery-container {
    display: flex;
    flex-direction: column;
}

.main-image {
    height: 700px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail {
    width: 70px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.thumbnail.active {
    border-color: var(--accent-color);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.product-info {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.product-info h2 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.product-code {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.price-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: var(--border-radius);
}

.original-price {
    text-decoration: line-through;
    color: var(--light-text);
}

.sale-price {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.product-description {
    margin-bottom: 20px;
    line-height: 1.7;
}

/* Purchase Options */
.purchase-options {
    background-color: #f8f8f8;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
}

.option-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.option-tab {
    padding: 8px 15px;
    background-color: #e0e0e0;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    transition: var(--transition);
    flex: 1;
}

.option-tab.active {
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: bold;
}

.option-details {
    display: none;
    padding: 10px;
    background-color: rgba(164, 216, 248, 0.1);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
}

.option-details.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.min-qty {
    font-weight: bold;
    color: var(--accent-color);
}

#retail-price, #wholesale-price {
    font-weight: bold;
}

.quantity-selector {
    margin-bottom: 15px;
}

.quantity-input {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.quantity-input button {
    width: 40px;
    height: 40px;
    background-color: var(--secondary-color);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-input button:hover {
    background-color: var(--accent-color);
}

.quantity-input input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
}

.total-price {
    background-color: var(--accent-color);
    color: white;
    padding: 10px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    font-weight: bold;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.primary-btn {
    background-color: #25d366;
    color: white;
}

.primary-btn:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
}

.secondary-btn {
    background-color: var(--secondary-color);
    color: white;
}

.secondary-btn:hover {
    background-color: #7bc0e8;
    transform: translateY(-2px);
}

.btn i {
    margin-left: 8px;
}

/* Similar Products Section */
.similar-products {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.similar-products h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.product-card {
    background-color: #f8f8f8;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.product-card-info {
    padding: 10px;
    text-align: center;
}

.product-card-info h4 {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.product-card-info p {
    color: var(--light-text);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.view-details-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

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

/* Order Form */
.order-form {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.order-form h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', sans-serif;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 20px 0;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: var(--shadow);
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.social-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-link:hover {
    color: var(--accent-color);
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 20px auto;
    padding: 20px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    animation: slideIn 0.3s ease;
}

.close-modal {
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

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

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

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .gallery-container {
        flex-direction: row;
    }
    
    .main-image {
        flex: 1;
        margin-left: 15px;
        margin-bottom: 0;
    }
    
    .thumbnails {
        flex-direction: column;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 0;
        width: 80px;
    }
    
    .action-buttons {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        margin-bottom: 10px;
    }
}

