/* Extracted and adapted from index.html for product details page */
:root {
    --primary: #2c3e50;
    --primary-dark: #1a252f;
    --secondary: #bdc3c7;
    --dark: #34495e;
    --light: #ffffff;
    --gray: #7f8c8d;
    --light-gray: #ecf0f1;
    --success: #27ae60;
    --danger: #c0392b;
    --warning: #f39c12;
    --border-radius: 8px;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-title: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
}

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

body {
    font-family: var(--font-body, 'Montserrat', sans-serif);
    background-color: var(--light-gray);
    color: var(--dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles (simplified for consistency) */
.main-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}
.main-header-bar .logo {
    font-family: var(--font-title, 'Playfair Display', serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
}
.main-header-bar .logo span {
    color: var(--primary);
}
.nav-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-icons a, .nav-icons i {
    color: var(--dark);
    font-size: 22px;
    transition: color 0.2s ease;
}
.nav-icons a:hover i {
    color: var(--primary);
}

/* Product Details Specific Styles */
.product-details-section {
    padding-top: 100px; /* Offset for fixed header */
    padding-bottom: 60px;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    background-color: var(--light);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.product-gallery {
    display: flex;
    flex-direction: column;
}
.main-image img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border: 1px solid var(--light-gray);
}
.thumbnail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}
.thumbnail-images img {
    width: 100%;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}
.thumbnail-images img:hover, .thumbnail-images img.active {
    border-color: var(--primary);
    transform: scale(1.05);
}

.product-info-details .product-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}
.product-info-details .product-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
}
.product-info-details .old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 20px;
    margin-right: 15px;
    font-weight: 400;
}

.product-options {
    margin-bottom: 25px;
}

.option-group {
    margin-bottom: 20px;
}
.option-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}
.option-group select, .quantity-selector input {
    width: 100%;
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--light-gray);
    font-size: 16px;
    background-color: #fdfdfd;
}

.quantity-selector {
    display: flex;
    align-items: center;
}
.quantity-selector input {
    text-align: center;
    border-left: none;
    border-right: none;
    width: 60px;
}
.quantity-btn {
    width: 40px;
    height: 46px;
    border: 1px solid var(--light-gray);
    background-color: #fdfdfd;
    cursor: pointer;
    font-size: 20px;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.2);
}

.btn-dark {
    background-color: var(--dark);
    color: var(--light);
}
.btn-dark:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.product-description {
    margin-top: 30px;
    line-height: 1.8;
    color: var(--gray);
    border-top: 1px solid var(--light-gray);
    padding-top: 20px;
}

@media (max-width: 992px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }
}

/* Image-based Color Selector Styles */
.color-selector {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}
.color-option {
    cursor: pointer;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 5px;
    transition: var(--transition);
    text-align: center;
}
.color-option:hover, .color-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(44, 62, 80, 0.1);
}
.color-option img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}
.color-option span {
    font-size: 13px;
    font-weight: 500;
    margin-top: 5px;
    display: block;
}
/* Cart Sidebar Styles (from index.html) */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002; /* Higher than header */
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.cart-sidebar.active {
    right: 0;
}
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    background-color: var(--dark);
    color: var(--light);
}
.cart-header h3 {
    font-size: 20px;
}
.close-cart {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--light);
}
.cart-items {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}
.empty-cart-message {
    text-align: center;
    padding-top: 50px;
    color: var(--gray);
}
.cart-summary {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
}
.cart-subtotal, .cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}
.cart-total {
    font-size: 1.2em;
    padding-top: 10px;
    border-top: 1px solid var(--light-gray);
}
.checkout-btn {
    width: 100%;
    margin-top: 15px;
}
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}
.cart-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}
.cart-item-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-right: 15px;
}
.cart-item-details {
    flex-grow: 1;
}
.cart-item-title {
    font-weight: 600;
}
.cart-item-variant {
    font-size: 0.9em;
    color: var(--gray);
}
.cart-item-price {
    font-weight: 700;
    margin: 5px 0;
}
.cart-item-quantity {
    display: flex;
    align-items: center;
}
.quantity-input {
    width: 40px;
    text-align: center;
    border: 1px solid var(--light-gray);
    margin: 0 5px;
}
.cart-item-remove {
    font-size: 0.8em;
    color: var(--danger);
    cursor: pointer;
    text-decoration: underline;
}
#cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}
#cart-count.hidden {
    display: none;
}
#cart-icon.animate i {
    animation: bounce 0.6s ease;
}
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}
