/* Product Detail Page Styles */
.product-detail-section {
    padding: 3rem 0;
    background-color: #fcfbfe;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #5a4b6e;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: all 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-4px);
    text-decoration: none;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

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

/* Image Gallery */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: linear-gradient(135deg, #f5f0ff, #e9e0fc);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #b56bff;
}

.gallery-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.thumbnails-container {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background-color: #fdfdfd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.thumb-img:hover {
    border-color: #d1b8fa;
    transform: translateY(-2px);
}

.thumb-img.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(181, 107, 255, 0.2);
}

/* Product Info Card */
.info-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.product-category {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.product-name {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.price-stock-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3ecfc;
}

.price-tag {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stock-badge {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
}

.stock-badge.in-stock {
    background-color: #e6f9f3;
    color: #00b074;
}

.stock-badge.out-of-stock {
    background-color: #ffebe6;
    color: #ff5b5b;
}

.product-description {
    font-size: 1.05rem;
    color: #5a4b6e;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.rent-btn {
    background: var(--accent);
    color: #3f3500;
    padding: 0.85rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: none;
    flex-grow: 1;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 230, 109, 0.3);
}

.rent-btn:hover {
    background-color: #f7d848;
    color: #2b2400;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 230, 109, 0.5);
    text-decoration: none;
}

.rent-btn:disabled, .rent-btn.disabled {
    background: #e9e9e9;
    color: #999;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.cart-item-edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.cart-item-edit-actions .rent-btn {
    flex-grow: 0;
}

/* Add On Products Section */
.add-on-products-section {
    padding-top: 2.5rem;
    padding-bottom: 1rem;
    border-top: 1px solid #e9e0fc;
    margin-bottom: 1rem;
}

.add-on-products-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
    position: relative;
    display: inline-block;
}

.add-on-products-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 40px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.add-on-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.add-on-product-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-on-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.add-on-product-image-link {
    display: block;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    position: relative;
    background: linear-gradient(135deg, #f5f0ff, #e9e0fc);
}

.add-on-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-on-product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #b56bff;
    font-size: 2rem;
}

.add-on-product-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.85rem 1rem 1rem;
}

.add-on-product-name {
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.95rem;
}

.add-on-product-name:hover {
    color: var(--primary);
    text-decoration: none;
}

.add-on-product-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.add-on-in-cart {
    align-self: flex-start;
}

.add-on-in-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* More About This Item Section */
.more-info-section {
    padding-top: 3rem;
    border-top: 1px solid #e9e0fc;
}

.more-info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.more-info-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 40px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.html-content {
    font-size: 1rem;
    color: #4a3e56;
    line-height: 1.7;
}

.html-content p {
    margin-bottom: 1rem;
}

.html-content ul, .html-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.html-content li {
    margin-bottom: 0.5rem;
}
