/* Layout foundation */
html, body {
    height: 100%;
    margin: 0;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main {
    flex: 1;
}

/* Header */
.rdp-header {
    background:#333;
    color:#fff;
    padding:15px;
}
.rdp-nav {
    max-width:1000px;
    margin:0 auto;
    display:flex;
    justify-content:center;
    gap:20px;
    align-items:center;
}
.rdp-nav a {
    color:#fff;
    text-decoration:none;
}

/* Dropdown */
.rdp-dropdown {
    position:relative;
}
.rdp-dropdown-content {
    display:none;
    position:absolute;
    background:#444;
    padding:10px;
    border-radius:4px;
    top:100%;
    left:0;
    min-width:180px;
    z-index:1000;
}
.rdp-dropdown:hover .rdp-dropdown-content {
    display:block;
}
.rdp-dropdown-content a {
    display:block;
    padding:8px 10px;
    color:#fff;
    text-decoration:none;
}
.rdp-dropdown-content a:hover {
    background:#555;
}

/* Product layout */
.rdp-product-container {
    display:flex;
    max-width:1000px;
    margin:20px auto;
    gap:30px;
}

/* FIX: Product image size */
.rdp-carousel {
    flex:1;
    position:relative;
    z-index:1;
}
.rdp-carousel img {
    width:100%;
    max-width:450px;      /* prevents huge images */
    height:350px;         /* consistent height */
    object-fit:cover;     /* crops nicely */
    border-radius:8px;
    display:block;
    margin:0 auto;
}

/* Position badge inside carousel */
.rdp-carousel {
    flex:1;
    position:relative;
    z-index:1;
}

.rdp-carousel img {
    width:100%;
    max-width:450px;
    height:350px;
    object-fit:cover;
    border-radius:8px;
    display:block;
    margin:0 auto;
}

.rdp-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;       /* use right instead of left */
    background: #e60000;
    color: #fff;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 2;
}



/* Carousel arrows */
.rdp-carousel button {
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    background:#333;
    color:#fff;
    border:none;
    padding:10px;
    cursor:pointer;
}
.rdp-carousel .prev { left:10px; }
.rdp-carousel .next { right:10px; }

/* Product info */
.rdp-info { flex:1; background:#000; /* black background */ padding:20px; border-radius:8px; box-shadow:0 2px 8px rgba(0,0,0,0.6); /* darker shadow for contrast */ color:#fff; /* default text color white */ } .rdp-info h2, .rdp-info p, .rdp-info strong { color:#fff; /* ensure headings and text are white */ }

/* Price styling */
.rdp-price-original {
    text-decoration:line-through;
    color:#888;
}
.rdp-price-sale {
    margin-left:8px;
    color:#e60000;
    font-weight:700;
}
.rdp-out-of-stock {
    color:red;
    font-weight:700;
}

/* Recommended section */
.recommend-container {
    max-width:1000px;
    margin:40px auto;
}
.recommend-title {
    font-size:22px;
    font-weight:700;
    margin-bottom:15px;
}

/* FIX: Horizontal scrolling */
.recommend-carousel {
    display:flex;
    flex-wrap:nowrap;         /* prevents stacking */
    overflow-x:auto;          /* horizontal scroll */
    gap:20px;
    padding-bottom:10px;
}

/* FIX: Recommended item size */
.recommend-item {
    min-width:180px;
    max-width:180px;
    background:#fff;
    border-radius:8px;
    padding:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    text-align:center;
    flex-shrink:0;            /* prevents shrinking */
}
.recommend-item img {
    width:100%;
    height:140px;
    object-fit:cover;
    border-radius:6px;
}
.recommend-item a {
    text-decoration:none;
    color:#333;
    font-weight:600;
}
.recommend-price {
    color:#e60000;
    font-weight:700;
}

.recommend-thumb-wrapper {
    position: relative;
    display: inline-block;
}

.recommend-thumb-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.recommend-discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e60000;
    color: #fff;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
}


/* Footer */
.rdp-footer {
    background:#eee;
    padding:15px;
    text-align:center;
    margin-top:auto;
}
