/* Frontend Generic Styles */

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

/* Font families based on locale */
html[lang="en"] body,
html[dir="ltr"] body,
html[lang="en"],
html[dir="ltr"] {
    font-family: 'Montserrat', sans-serif;
    font-weight: normal;
}

html[lang="en"] body strong,
html[dir="ltr"] body strong,
html[lang="en"] strong,
html[dir="ltr"] strong,
html[lang="en"] b,
html[dir="ltr"] b,
html[lang="en"] [style*="font-weight: bold"],
html[dir="ltr"] [style*="font-weight: bold"],
html[lang="en"] [style*="font-weight:700"],
html[dir="ltr"] [style*="font-weight:700"] {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

html[lang="ar"] body,
html[dir="rtl"] body,
html[lang="ar"],
html[dir="rtl"] {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

body {
    background-color: #f7f8fa;
    color: #000000;
}

html.dark body {
    background-color: #0f172a;
    color: #f1f5f9;
}

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

/* Header Section */
.section-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 500;
    color: #333;
}

.more-link {
    position: absolute;
    left: 0;
    font-size: 16px;
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.more-link:hover {
    color: #000;
}

/* Grid Layout */
.products-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Product Card */
.product-card {
    width: 326px;
    background-color: #ffffff;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.justify-items-center {
    justify-items: center !important;
}

/* Image Container Styling */
.product-image-container {
    padding: 3px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 326px;
    height: 326px;
    overflow: hidden;
}

.product-image {
    width: 320px;
    height: 320px;
    display: block;
    object-fit: cover;
}

/* Legacy image-container support */
.image-container {
    height: 250px;
    width: 100%;
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Product Details */
.product-details {
    padding: 5px;
    border-top: 1px solid #eeeeee;
    text-align: left;
}

.product-name {
    font-size: 22px;
    font-weight: bold;
    color: #000000;
    margin: 5px;
    text-transform: none !important;
    letter-spacing: 0.5px;
}

html[dir="rtl"] .product-name {
    text-align: right !important;
}

html[dir="ltr"] .product-name {
    text-align: left !important;
}

/* Price Styling */
.product-price {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 8px;
    margin: 5px;
}

.current-price {
    font-size: 16px;
    font-weight: bold;
    color: #999;
}

.old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
    font-weight: normal;
}

/* Legacy product-price support */
.product-price strong {
    font-weight: 700;
}

/* Footer Styles */
footer {
    color: #000000 !important;
}

footer h5 {
    color: #000000 !important;
}

footer p {
    color: #000000 !important;
}

footer .text-body-secondary {
    color: #000000 !important;
}

footer .link-body-emphasis {
    color: #000000 !important;
}

footer .nav-link {
    color: #000000 !important;
}

footer .border-top {
    border-color: rgba(0, 0, 0, 0.2) !important;
}

footer a:hover {
    color: rgba(0, 0, 0, 0.7) !important;
}

/* Dark Mode Footer */
html.dark footer {
    color: #ffffff !important;
}

html.dark footer h5 {
    color: #ffffff !important;
}

html.dark footer p {
    color: #ffffff !important;
}

html.dark footer .text-body-secondary {
    color: #ffffff !important;
}

html.dark footer .link-body-emphasis {
    color: #ffffff !important;
}

html.dark footer .nav-link {
    color: #ffffff !important;
}

html.dark footer .border-top {
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html.dark footer a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-grid {
        flex-direction: column;
        align-items: center;
    }

    .product-card {
        width: 100%;
        max-width: 326px;
    }
    
    .product-image-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        max-width: 326px;
        margin: 0 auto;
        padding: 3px;
    }
    
    .product-image {
        width: calc(100% - 6px);
        height: calc(100% - 6px);
        max-width: 320px;
        max-height: 320px;
        object-fit: cover;
    }
    
    .product-image-placeholder {
        width: calc(100% - 6px) !important;
        height: calc(100% - 6px) !important;
        max-width: 320px;
        max-height: 320px;
        margin: 0 auto;
    }
    
    .current-price {
        font-size: 20px;
    }
    
    .old-price {
        font-size: 14px;
    }
    
    .product-name {
        font-size: 18px;
    }
    
    .current-price {
        font-size: 14px;
    }
}

/* Product Ribbon */
.product-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #000;
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
    border-radius: 2px;
}

[dir="rtl"] .product-ribbon {
    left: auto;
    right: 10px;
}

/* Color Variants for product-card */
.color-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.color-variants {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}.color-variant-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    position: relative;
    transition: all 0.2s;
    outline: none;
}.color-variant-btn:hover {
    transform: scale(1.1);
}

.color-variant-btn.active {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.color-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
}
