:root {
    --dark-bg: #1a1a2e;
    --card-bg: #27273d;
    --text-color: #e0e0e0;
    --light-text: #a0a0a0;
    --purple-accent: #9b59b6;
    --green-check: #2ecc71;
    --yellow-dot: #f1c40f;
    --red-dot: #e74c3c;
    --blue-dot: #3498db;
    --button-bg: #8e44ad;
    --button-hover-bg: #7c3b99;
    --border-color: #3b3b5c;
}



.page-container { /* Changed from .container */
    width: 100%;
    max-width: 1200px;
}

.site-header { /* Changed from .header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

    .site-header h1 {
        font-size: 2.2em;
        color: var(--text-color);
        margin: 0;
    }

    .site-header p {
        color: var(--light-text);
        margin-top: 5px;
        font-size: 0.9em;
    }

.view-all-button { /* Changed from .show-all-btn */
    background-color: var(--purple-accent);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

    .view-all-button:hover {
        background-color: var(--button-hover-bg);
    }

.product-grid { /* Changed from .account-cards */
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.product-card { /* Changed from .account-card */
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column; /* Ensure content stacks vertically */
}

    .product-card:hover {
        transform: translateY(-5px);
    }

.prod-image-wrapper { /* Changed from .card-image-placeholder */
    width: 100%;
    height: 180px; /* Fixed height for all images */
    position: relative;
    overflow: hidden; /* Ensure image doesn't spill */
    border-bottom: 1px solid var(--border-color);
    display: flex; /* For centering img if needed */
    justify-content: center;
    align-items: center;
}

    .prod-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* This makes sure the image covers the area without distortion */
        display: block; /* Remove extra space below image */
    }

/* Removed .card-image-1, .card-image-2, .card-image-3 as images are now direct <img> tags */

.prod-image-overlay { /* Changed from .image-overlay-text */
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: 600;
}

.prod-content-area { /* Changed from .card-content */
    padding: 7px;
    flex-grow: 1; /* Allow content area to grow */
    display: flex;
    flex-direction: column;
}

.prod-details-grid { /* Changed from .account-details */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 5px;
    margin-bottom: 20px;
}

.detail-row { /* Changed from .detail-item */
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 5px;
}

    .detail-row:nth-child(odd):not(:last-child) { /* Ensure no double border on last pair */
        border-bottom: 1px dashed var(--border-color);
    }

    .detail-row:nth-child(even):not(:last-child) { /* Ensure no double border on last pair */
        border-bottom: 1px dashed var(--border-color);
    }

    .detail-row:last-child,
    .detail-row:nth-last-child(2) {
        border-bottom: none; /* Remove border for the last two items in a pair */
    }


.detail-label {
    color: var(--light-text);
}

.detail-value {
    color: var(--text-color);
    font-weight: 600;
}

.prod-name { /* New class for the single-line name */
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis */
    text-align: left; /* RTL adjustment */
}

.prod-description { /* Changed from .summary-line - now for 2 lines */
    font-size: 0.95em;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    text-align: left; /* RTL adjustment */

    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .prod-description .bullet-point { /* Changed from .dot */
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin-left: 5px; /* RTL adjustment */
    }

.bullet-point.yellow {
    background-color: var(--yellow-dot);
}

.bullet-point.red {
    background-color: var(--red-dot);
}

.bullet-point.blue {
    background-color: var(--blue-dot);
}

.bullet-point.green {
    background-color: var(--green-check);
}

.prod-footer-sticky { /* New wrapper for price, button, seller info */
    margin-top: auto; /* Push to the bottom */
    padding-top: 10px; /* Add some space above */
}

.prod-price { /* Changed from .price */
    font-size: 2.5em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

.buy-action-button { /* Changed from .buy-now-btn */
    background-color: var(--button-bg);
    color: white;
    padding: 10px 0;
    width: 100%;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

    .buy-action-button:hover {
        background-color: var(--button-hover-bg);
    }

    .buy-action-button svg {
        margin-left: 10px; /* RTL adjustment */
    }

.prod-seller-info { /* Changed from .seller-info */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85em;
    color: var(--light-text);
}

.seller-name-display { /* Changed from .seller-name */
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

    .seller-name-display img {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        margin-left: 8px; /* RTL adjustment */
    }

.sales-metrics { /* Changed from .sales-status */
    display: flex;
    align-items: center;
}

    .sales-metrics svg {
        margin-left: 5px; /* RTL adjustment */
        color: var(--green-check);
    }

/* RTL layout adjustments (some are already set, consolidating/reviewing) */
.site-header h1, .site-header p {
    text-align: left;
}

.detail-row {
    direction: ltr; /* Keep detail key-value pairs LTR for readability */
}

.prod-description {
    text-align: left;
}

.prod-name {
    text-align: left;
}

.buy-action-button {
    text-align: center;
}

.prod-seller-info {
    flex-direction: row-reverse;
}
/* Swap seller name and sales */
.seller-name-display {
    flex-direction: row-reverse;
}
/* Swap image and name */
.sales-metrics {
    flex-direction: row-reverse;
}
/* Swap sales text and checkmark */
.prod-description .bullet-point {
    margin-right: 5px;
    margin-left: 0; /* Adjust dots for RTL flow */
}


/* Responsive adjustments */
@media (max-width: 992px) {
    .product-grid {
        flex-direction: column;
        align-items: center;
    }

    .product-card {
        max-width: 450px; /* Wider cards on medium screens */
    }
}

@media (max-width: 600px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

        .site-header h1 {
            margin-bottom: 5px;
        }

    .view-all-button {
        margin-top: 15px;
        width: 100%;
    }

    .product-card {
        max-width: 100%; /* Full width on small screens */
    }

    .prod-details-grid {
        grid-template-columns: 1fr; /* Stack details on very small screens */
    }
    /* Re-add borders for single column layout, then remove last one */
    .detail-row {
        border-bottom: 1px dashed var(--border-color);
    }

        .detail-row:last-child {
            border-bottom: none;
        }
}
