:root {
    --accent: #09367b;
    --accent-light: rgba(9, 54, 123, 0.1);
    --accent-dark: #062c65;
    --accent-gradient: linear-gradient(90deg, #062c65, #09367b 50%, #062c65);
    --bg-light: #f8f9fa;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --border: #dfe6e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}
.readonly-field {
    background: #f1f1f1;
    cursor: not-allowed;
    color: #555;
}


.product-single-page {
    padding: 2rem 0 4rem;
    margin-top: 110px;
    min-height: 100vh;
}

.product-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Breadcrumb */
.product-breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-separator {
    color: var(--text-secondary);
    margin: 0 0.25rem;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-link:hover {
    color: var(--accent);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Main Product Layout */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
    margin-bottom: 3rem;
}

/* Image Gallery - Fixed height */
.product-gallery {
    display: flex;
    gap: 1rem;
    height: 500px; /* Fixed height */
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2px 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.thumbnail-list::-webkit-scrollbar {
    width: 4px;
}

.thumbnail-list::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 2px;
}

.thumbnail-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 2px;
}

.thumbnail-item {
    width: 80px;
    height: 80px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.main-image-container {
    flex: 1;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
    height: 100%; /* Take full height */
}

.main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Lightbox/Fancybox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: fadeIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

/* Product Info */
.product-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.product-category {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 0 0 1rem 0;
    line-height: 1.2;
    border-bottom: 1px solid var(--border);
}

.product-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.product-subtitle p{
    margin-bottom: 13px;
}
/* Specifications Section - Fixed layout */
.specifications-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.specifications-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-light);
}

.specifications-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.specifications-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.spec-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

/* Order Button */
.order-section {
    margin-top: auto;
}

.order-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(90deg, #10b981, #34d399);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.order-button:hover {
    background: linear-gradient(90deg, #0da271, #2bb884);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.order-button:active {
    transform: translateY(0);
}

/* Content Section */
.content-section {
    grid-column: 1 / -1;
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.content-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-light);
}

.content-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
}

.content-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.product-content {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.product-content h2,
.product-content h3 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.product-content p {
    margin-bottom: 1rem;
}

.product-content ul,
.product-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.product-content li {
    margin-bottom: 0.5rem;
}

/* Related Products */
.related-products-section {
    grid-column: 1 / -1;
    margin-top: 3rem;
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.related-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.related-image {
    height: 180px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.related-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.related-content {
    padding: 1.25rem;
}

.related-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Modal Styles */
.order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.order-modal.show {
    display: flex;
}

.order-modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.order-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--accent-light);
}

.order-modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.order-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.order-modal-body {
    padding: 1.5rem;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    width: 100%;
}

.btn-secondary {
    background: var(--accent-light);
    color: var(--accent);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        height: 450px;
    }
}

@media (max-width: 992px) {
    .product-gallery {
        flex-direction: column-reverse;
        height: auto;
    }

    .thumbnail-list {
        flex-direction: row;
        width: 100%;
        height: 100px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .main-image-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .product-container {
        padding: 0 1rem;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .main-image-container {
        height: 350px;
        padding: 1rem;
    }

    .spec-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .spec-value {
        text-align: left;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .product-title {
        font-size: 1.5rem;
    }

    .main-image-container {
        height: 300px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}





/* Backdrop */
#orderAlertBackdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1290;
    display: none;
}

/* Modal container */
#orderAlert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 1300;
    max-width: 520px;
    width: calc(100% - 40px);
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    display: none;
    font-family: inherit;
    text-align: left;
}

#orderAlertClose {
    position: absolute;
    right: 2px;
    top: 0px;
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    padding: 6px;
}

#orderAlert.success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
    box-shadow: 0 20px 60px rgba(0, 128, 0, 0.25);
}

#orderAlert.success #orderAlertContent strong {
    color: #065f46;
}

#orderAlert.error {
    background: #4a0f17;
    color: #fff4f6;
    border: 1px solid #ff8a8a;
}

#orderAlert #orderAlertContent {
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 2px;
}

.field-error { color: #ffd0d0; font-size: .9rem; margin-top: 6px; }

.readonly-field { background:#f7f7f7; border:1px solid #e8e8e8; padding: .6rem; border-radius:6px; width:100%; }
#orderAlert.success #orderAlertClose {
    color: #065f46;
}
#orderAlert.error #orderAlertClose { color: rgba(255,255,255,0.9); }
