:root {
    /* Color Variables - Light Mode */
    --primary: #007bff;
    --primary-dark: #0056b3;
    --secondary: #6c757d;
    --secondary-dark: #5a6268;
    --success: #28a745;
    --success-dark: #1e7e34;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --border: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.08);
    
    /* Additional Colors */
    --body-bg: #f8f9fa;
    --body-color: #333;
    --card-bg: #ffffff;
    --toast-bg: #ffffff;
    --link-color: #007bff;
    --link-hover: #0056b3;
    --offer-bg: #fff3cd;
    --offer-color: #856404;
    --in-stock-bg: #d4edda;
    --in-stock-color: #155724;
    --low-stock-bg: #fff3cd;
    --low-stock-color: #856404;
    --out-stock-bg: #f8d7da;
    --out-stock-color: #721c24;
    --category-bg: #e9ecef;
    --category-color: #495057;
    --keyword-bg: #e9ecef;
    --keyword-color: #495057;
    --tab-active: #007bff;
    --tab-hover: #007bff40;
    --review-summary-bg: #f0f6ff;
    --empty-state-bg: #ffffff;
    --separator: #eee;
    
    /* Status Colors */
    --toast-success: #28a745;
    --toast-error: #dc3545;
    --toast-info: #17a2b8;
    --toast-warning: #ffc107;
    --star-color: #ffc107;
    
    /* Font Sizes (adjusted by dividing original rem values by 2) */
    --font-size-xs: 0.7rem;   /* 1.4rem/2 */
    --font-size-sm: 0.8rem;   /* 1.6rem/2 */
    --font-size-base: 0.8rem; /* 1.6rem/2 (body) */
    --font-size-lg: 1rem;     /* 2rem/2 */
    --font-size-xl: 1.2rem;   /* 2.4rem/2 */
    --font-size-2xl: 1.4rem;  /* 2.8rem/2 */
    --font-size-3xl: 1.5rem;  /* 3rem/2 */
    --font-size-4xl: 1.8rem;  /* 3.6rem/2 */
    --font-size-5xl: 2rem;    /* 4rem/2 */
}

.darkmode {
    /* Color Variables - Dark Mode */
    --primary: #3a86ff;
    --primary-dark: #2667cc;
    --secondary: #8b9bab;
    --secondary-dark: #6c7a8a;
    --success: #4cc9f0;
    --success-dark: #3ab0d9;
    --info: #6bd4f9;
    --warning: #ffd166;
    --danger: #ef476f;
    --light: #2d3748;
    --dark: #f7fafc;
    --gray: #a0aec0;
    --gray-light: #4a5568;
    --border: #4a5568;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.2);
    
    /* Additional Colors - Dark Mode */
    --body-bg: #1a202c;
    --body-color: #e2e8f0;
    --card-bg: #2d3748;
    --toast-bg: #2d3748;
    --link-color: #3a86ff;
    --link-hover: #2667cc;
    --offer-bg: #4a3c00;
    --offer-color: #ffd166;
    --in-stock-bg: #0a2f1c;
    --in-stock-color: #68d391;
    --low-stock-bg: #4a3c00;
    --low-stock-color: #ffd166;
    --out-stock-bg: #3a0d0d;
    --out-stock-color: #fc8181;
    --category-bg: #4a5568;
    --category-color: #e2e8f0;
    --keyword-bg: #4a5568;
    --keyword-color: #e2e8f0;
    --tab-active: #3a86ff;
    --tab-hover: #3a86ff40;
    --review-summary-bg: #1e2b3a;
    --empty-state-bg: #2d3748;
    --separator: #4a5568;
    
    /* Status Colors - Dark Mode */
    --toast-success: #4cc9f0;
    --toast-error: #ef476f;
    --toast-info: #6bd4f9;
    --toast-warning: #ffd166;
    --star-color: #ffd166;
}

/* --- Base Styles --- */
html {
    font-size: 100%; /* Changed from 60% to 100% */
    scroll-behavior: smooth;
}

body {
    font-size: var(--font-size-base); /* 1.6rem/2 = 0.8rem */
    line-height: 1.6;
    color: var(--body-color);
    background-color: var(--body-bg);
    margin: 0;
    padding: 0;
}

.epm-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0; /* 2rem/2 = 1rem */
}

/* --- Typography --- */
h1, h2, h3 {
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.75rem; /* 1.5rem/2 = 0.75rem */
    color: var(--dark);
}

h1 { font-size: var(--font-size-2xl); } /* 2.8rem/2 = 1.4rem */
h2 { font-size: var(--font-size-xl); } /* 2.4rem/2 = 1.2rem */
h3, .epm-section-title--h3 { font-size: var(--font-size-lg); } /* 2rem/2 = 1rem */

p { margin-bottom: 0.75rem; } /* 1.5rem/2 = 0.75rem */
a { color: var(--link-color); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

/* --- Buttons --- */
.epm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem; /* 1.2rem/2 = 0.6rem, 2.5rem/2 = 1.25rem */
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    font-weight: 600;
    border: none;
    border-radius: 25px; /* 50px/2 = 25px */
    cursor: pointer;
    text-transform: capitalize;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 4px/2 = 2px, 10px/2 = 5px */
    text-decoration: none !important;
}
.epm-button i { margin-right: 0.4rem; } /* 0.8rem/2 = 0.4rem */
.epm-button:hover { transform: translateY(-1px); box-shadow: 0 3px 7.5px rgba(0, 0, 0, 0.15); } /* 6px/2 = 3px, 15px/2 = 7.5px */
.epm-button:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }

.epm-button--primary { background-color: var(--primary); color: white; }
.epm-button--primary:hover { background-color: var(--primary-dark); }
.epm-button--secondary { background-color: var(--secondary); color: white; }
.epm-button--secondary:hover { background-color: var(--secondary-dark); }
.epm-button--success { background-color: var(--success); color: white; }
.epm-button--success:hover { background-color: var(--success-dark); }
.epm-button--disabled { background-color: var(--gray-light); color: var(--gray); cursor: not-allowed; box-shadow: none; }
.epm-button--disabled:hover { transform: none; box-shadow: none; }

/* --- Cards & Sections --- */
.epm-card {
    background-color: var(--card-bg);
    border-radius: 10px; /* 20px/2 = 10px */
    padding: 1.25rem; /* 2.5rem/2 = 1.25rem */
    margin-bottom: 1.25rem; /* 2.5rem/2 = 1.25rem */
    box-shadow: var(--shadow-lg);
}

/* --- Product Detail Page Specific --- */
.epm-product-detail-page {
    padding-top: 1rem; /* 2rem/2 = 1rem */
}

/* Data attributes container - no visual styling needed */
.epm-product-data-attributes { display: none; }

.epm-product-detail__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* 3rem/2 = 1.5rem */
    background-color: var(--card-bg);
    border-radius: 10px; /* 20px/2 = 10px */
    padding: 1.5rem; /* 3rem/2 = 1.5rem */
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem; /* 3rem/2 = 1.5rem */
}

@media (min-width: 768px) {
    .epm-product-detail__grid {
        grid-template-columns: 1fr 1.2fr;
    }
}
@media (min-width: 992px) {
    .epm-product-detail__grid {
        grid-template-columns: 0.8fr 1fr;
    }
}

/* Product Gallery */
.epm-product-gallery__viewer {
    position: relative;
    overflow: hidden;
    border-radius: 7.5px; /* 15px/2 = 7.5px */
    margin-bottom: 0.75rem; /* 1.5rem/2 = 0.75rem */
    box-shadow: 0 2px 7.5px rgba(0,0,0,0.1); /* 4px/2 = 2px, 15px/2 = 7.5px */
    background-color: var(--card-bg);
}
.epm-product-gallery__main-image {
    width: 100%;
    height: 200px; /* 400px/2 = 200px */
    object-fit: fill;
    display: block;
    border-radius: 7.5px; /* 15px/2 = 7.5px */
    transition: transform 0.4s ease, opacity 0.3s ease-in-out;
}
.epm-product-gallery__thumbnails {
    display: flex;
    gap: 0.5rem; /* 1rem/2 = 0.5rem */
    overflow-x: auto;
    padding-bottom: 0.25rem; /* 0.5rem/2 = 0.25rem */
    justify-content: center;
}
.epm-product-gallery__thumbnail {
    width: 40px; /* 80px/2 = 40px */
    height: 40px; /* 80px/2 = 40px */
    object-fit: cover;
    border-radius: 5px; /* 10px/2 = 5px */
    cursor: pointer;
    border: 1px solid transparent; /* 2px/2 = 1px */
    transition: border-color 0.3s ease, transform 0.2s ease;
    opacity: 0.7;
}
.epm-product-gallery__thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}
.epm-product-gallery__thumbnail--active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 4px rgba(58, 134, 255, 0.5); /* Using dark mode primary */
}

/* Product Info */
.epm-product-info {
    display: flex;
    flex-direction: column;
}
.epm-product-info__header { margin-bottom: 1rem; } /* 2rem/2 = 1rem */
.epm-product-info__name { 
    font-size: var(--font-size-3xl); /* 3rem/2 = 1.5rem */
    line-height: 1.3; 
    margin-bottom: 0.5rem; /* 1rem/2 = 0.5rem */
}
.epm-product-info__meta-details {
    font-size: var(--font-size-sm); /* 1.4rem/2 = 0.7rem */
    color: var(--gray);
    margin-bottom: 0.75rem; /* 1.5rem/2 = 0.75rem */
}
.epm-product-info__meta-details a { 
    color: var(--link-color); 
    font-weight: 600; 
}
.epm-product-info__category-tag {
    display: inline-block;
    background-color: var(--category-bg);
    color: var(--category-color);
    padding: 0.15rem 0.4rem; /* 0.3rem/2 = 0.15rem, 0.8rem/2 = 0.4rem */
    border-radius: 25px; /* 50px/2 = 25px */
    font-size: var(--font-size-xs); /* 1.2rem/2 = 0.6rem */
    margin-left: 0.5rem; /* 1rem/2 = 0.5rem */
}
.epm-product-info__limited-offer {
    background-color: var(--offer-bg);
    color: var(--offer-color);
    padding: 0.5rem 0.75rem; /* 1rem/2 = 0.5rem, 1.5rem/2 = 0.75rem */
    border-radius: 5px; /* 10px/2 = 5px */
    margin-bottom: 1rem; /* 2rem/2 = 1rem */
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07); /* 2px/2 = 1px, 8px/2 = 4px */
}
.epm-product-info__limited-offer i { margin-right: 0.4rem; } /* 0.8rem/2 = 0.4rem */

/* Pricing & Stock Block */
.epm-product-info__price-stock-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem; /* 1rem/2 = 0.5rem */
    margin-bottom: 1.25rem; /* 2.5rem/2 = 1.25rem */
}
@media (min-width: 576px) {
    .epm-product-info__price-stock-block {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.epm-product-pricing { display: flex; align-items: baseline; gap: 0.5rem; } /* 1rem/2 = 0.5rem */
.epm-product-pricing__current {
    font-size: 1.3rem; /* 2.6rem/2 = 1.3rem */
    font-weight: 700;
    color: var(--success);
}
.epm-product-pricing__original {
    font-size: 0.9rem; /* 1.8rem/2 = 0.9rem */
    color: var(--gray);
    text-decoration: line-through;
}
.epm-product-pricing__negotiable {
    font-size: 1.1rem; /* 2.2rem/2 = 1.1rem */
    font-weight: 600;
    color: var(--info);
}
.epm-product-stock {
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    padding: 0.25rem 0.5rem; /* 0.5rem/2 = 0.25rem, 1rem/2 = 0.5rem */
    border-radius: 25px; /* 50px/2 = 25px */
    display: inline-flex;
    align-items: center;
}
.epm-product-stock i { margin-right: 0.25rem; } /* 0.5rem/2 = 0.25rem */
.epm-product-stock--in-stock { background-color: var(--in-stock-bg); color: var(--in-stock-color); }
.epm-product-stock--low-stock { background-color: var(--low-stock-bg); color: var(--low-stock-color); }
.epm-product-stock--out-of-stock { background-color: var(--out-stock-bg); color: var(--out-stock-color); }

/* Quick View / Summary */
.epm-product-quick-view { margin-bottom: 1.25rem; } /* 2.5rem/2 = 1.25rem */
.epm-product-quick-view__text { 
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    color: var(--gray);
}

/* Variations / Options */
.epm-product-options { margin-bottom: 1.25rem; } /* 2.5rem/2 = 1.25rem */
.epm-product-options__item { 
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    margin-bottom: 0.4rem; /* 0.8rem/2 = 0.4rem */
}
.epm-product-options__item strong { color: var(--dark); }

/* Actions */
.epm-product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 1.5rem/2 = 0.75rem */
    margin-top: auto;
    padding-top: 1rem; /* 2rem/2 = 1rem */
    border-top: 1px solid var(--separator);
}
@media (min-width: 480px) {
    .epm-product-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Tabs */
.epm-product-tabs {
    margin-top: 2rem; /* 4rem/2 = 2rem */
    background-color: var(--card-bg);
    border-radius: 10px; /* 20px/2 = 10px */
    padding: 1.5rem; /* 3rem/2 = 1.5rem */
    box-shadow: var(--shadow-lg);
}
.epm-product-tabs__navigation {
    display: flex;
    gap: 0.25rem; /* 0.5rem/2 = 0.25rem */
    margin-bottom: 1.25rem; /* 2.5rem/2 = 1.25rem */
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.epm-product-tabs__trigger {
    padding: 0.6rem 1rem; /* 1.2rem/2 = 0.6rem, 2rem/2 = 1rem */
    font-size: 0.8rem; /* 1.6rem/2 = 0.8rem */
    font-weight: 600;
    background-color: transparent;
    color: var(--gray);
    border: none;
    border-bottom: 1.5px solid transparent; /* 3px/2 = 1.5px */
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    box-shadow: none;
}
.epm-product-tabs__trigger:hover {
    color: var(--primary);
    border-bottom-color: var(--tab-hover);
}
.epm-product-tabs__trigger--active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.epm-product-tabs__panel { display: none; }
.epm-product-tabs__panel--active { display: block; animation: epmFadeIn 0.5s ease; }

@keyframes epmFadeIn {
    from { opacity: 0; transform: translateY(5px); } /* 10px/2 = 5px */
    to { opacity: 1; transform: translateY(0); }
}

.epm-product-tabs__description-content,
.epm-specifications-list,
.epm-keyword-tags {
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    line-height: 1.7;
}
.epm-specifications-list dt { 
    font-weight: 600; 
    color: var(--dark); 
    margin-top: 0.5rem; /* 1rem/2 = 0.5rem */
}
.epm-specifications-list dd { 
    margin-left: 0; 
    margin-bottom: 0.5rem; /* 1rem/2 = 0.5rem */
    color: var(--gray);
}

.epm-keyword-tags__tag {
    display: inline-block;
    background-color: var(--keyword-bg);
    color: var(--keyword-color);
    padding: 0.25rem 0.6rem; /* 0.5rem/2 = 0.25rem, 1.2rem/2 = 0.6rem */
    border-radius: 25px; /* 50px/2 = 25px */
    margin-right: 0.4rem; /* 0.8rem/2 = 0.4rem */
    margin-bottom: 0.4rem; /* 0.8rem/2 = 0.4rem */
    font-size: 0.65rem; /* 1.3rem/2 = 0.65rem */
}

/* --- Reviews Section --- */
.epm-customer-reviews { margin-top: 2rem; } /* 4rem/2 = 2rem */
.epm-section-title { margin-bottom: 1.25rem; } /* 2.5rem/2 = 1.25rem */

.epm-review-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* 1rem/2 = 0.5rem */
    padding: 1rem; /* 2rem/2 = 1rem */
    background-color: var(--review-summary-bg);
    border-radius: 7.5px; /* 15px/2 = 7.5px */
    margin-bottom: 1.5rem; /* 3rem/2 = 1.5rem */
    box-shadow: 0 2px 7.5px rgba(0,0,0,0.06); /* 4px/2 = 2px, 15px/2 = 7.5px */
}
@media (min-width: 576px) {
    .epm-review-summary {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1rem; /* 2rem/2 = 1rem */
    }
}

.epm-star-rating { 
    color: var(--star-color); 
    font-size: 0.9rem; /* 1.8rem/2 = 0.9rem */
}
.epm-star-rating--large { font-size: 1.2rem; } /* 2.4rem/2 = 1.2rem */
.epm-star-rating i { margin: 0 0.05rem; } /* 0.1rem/2 = 0.05rem */

.epm-review-summary__score-text { 
    font-size: 1rem; /* 2rem/2 = 1rem */
    font-weight: 600; 
    color: var(--primary-dark);
}
.epm-review-summary__count-text { 
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    color: var(--gray);
}

.epm-review-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem; /* 2.5rem/2 = 1.25rem */
}
@media (min-width: 768px) {
    .epm-review-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.epm-review-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem; /* 1rem/2 = 0.5rem */
    border-bottom: 1px solid var(--separator);
    padding-bottom: 0.5rem; /* 1rem/2 = 0.5rem */
}
.epm-review-card__author { 
    font-weight: 600; 
    font-size: 0.85rem; /* 1.7rem/2 = 0.85rem */
    color: var(--dark);
}
.epm-review-card__date { 
    font-size: 0.65rem; /* 1.3rem/2 = 0.65rem */
    color: var(--gray);
}
.epm-review-card .epm-star-rating { margin-bottom: 0.5rem; } /* 1rem/2 = 0.5rem */
.epm-review-card__text { 
    font-size: 0.75rem; /* 1.5rem/2 = 0.75rem */
    color: var(--gray); 
    line-height: 1.7;
}

.epm-empty-state-message {
    text-align: center;
    font-size: 0.8rem; /* 1.6rem/2 = 0.8rem */
    color: var(--gray);
    padding: 1.5rem; /* 3rem/2 = 1.5rem */
    background-color: var(--empty-state-bg);
    border-radius: 10px; /* 20px/2 = 10px */
    box-shadow: var(--shadow-lg);
}

/* --- Scroll Animations --- */
.epm-animate-on-scroll {
    opacity: 0;
    transform: translateY(15px); /* 30px/2 = 15px */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.epm-animate-on-scroll--visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Notification Toast --- */
.epm-toast-notification {
    position: fixed;
    top: 10px; /* 20px/2 = 10px */
    right: 10px; /* 20px/2 = 10px */
    background-color: var(--toast-bg);
    border-radius: 5px; /* 10px/2 = 5px */
    box-shadow: 0 2.5px 7.5px rgba(0, 0, 0, 0.2); /* 5px/2 = 2.5px, 15px/2 = 7.5px */
    z-index: 1050;
    width: 175px; /* 350px/2 = 175px */
    max-width: 90%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow: hidden;
}
.epm-toast-notification.epm-toast-notification--show {
    opacity: 1;
    transform: translateX(0);
}
.epm-toast-notification__content {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem; /* 1.5rem/2 = 0.75rem */
}
.epm-toast-notification__icon {
    font-size: 1.2rem; /* 2.4rem/2 = 1.2rem */
    margin-right: 0.75rem; /* 1.5rem/2 = 0.75rem */
    flex-shrink: 0;
}
.epm-toast-notification__text {
    flex-grow: 1;
}
.epm-toast-notification__title {
    font-size: 0.85rem; /* 1.7rem/2 = 0.85rem */
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 0.25rem; /* 0.5rem/2 = 0.25rem */
}
.epm-toast-notification__message {
    font-size: 0.7rem; /* 1.4rem/2 = 0.7rem */
    margin-bottom: 0;
    line-height: 1.5;
}
.epm-toast-notification__close {
    background: transparent;
    border: none;
    font-size: 1.1rem; /* 2.2rem/2 = 1.1rem */
    font-weight: 300;
    color: var(--gray);
    cursor: pointer;
    padding: 0 0.25rem; /* 0.5rem/2 = 0.25rem */
    line-height: 1;
    opacity: 0.7;
    margin-left: 0.5rem; /* 1rem/2 = 0.5rem */
}
.epm-toast-notification__close:hover {
    opacity: 1;
    color: var(--dark);
}

/* Notification Types */
.epm-toast-notification--success .epm-toast-notification__icon { color: var(--toast-success); }
.epm-toast-notification--success { border-left: 2.5px solid var(--toast-success); } /* 5px/2 = 2.5px */
.epm-toast-notification--error .epm-toast-notification__icon { color: var(--toast-error); }
.epm-toast-notification--error { border-left: 2.5px solid var(--toast-error); }
.epm-toast-notification--info .epm-toast-notification__icon { color: var(--toast-info); }
.epm-toast-notification--info { border-left: 2.5px solid var(--toast-info); }
.epm-toast-notification--warning .epm-toast-notification__icon { color: var(--toast-warning); }
.epm-toast-notification--warning { border-left: 2.5px solid var(--toast-warning); }

.epm-loading-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 1px solid rgba(255, 255, 255, 0.3); /* 2px/2 = 1px */
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.epm-button--disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.epm-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}