:root {
    --primary-blue: #334155;
    --primary-dark: #1E293B;
    --accent-blue: #0EA5E9;
    --electric-orange: #EF4444;
    --bg-light: #F1F5F9;
    --bg-white: #FFFFFF;
    --text-dark: #0F172A;
    --text-gray: #475569;
    --text-light: #94A3B8;
    --border-light: #CBD5E1;
    --border-medium: #94A3B8;
    --success-green: #10B981;
    --warning-red: #DC2626;
    --shadow-sm: 0 1px 2px 0 rgba(0, 82, 204, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 82, 204, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 82, 204, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 82, 204, 0.15)
}

.product-hero {
    background: linear-gradient(135deg, #212c36 0%, #374b5f 100%);
    color: white;
    padding: 80px 0 60px;
    margin-top: 2%;
    border-radius: 20px
}

.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px
}

.hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease
}

.hero-breadcrumb a:hover {
    color: white
}

.breadcrumb-divider {
    color: rgba(255, 255, 255, 0.5)
}

.hero-breadcrumb span:last-child {
    color: white;
    font-weight: 500
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9
}

.product-main-section {
    padding: 60px 0;
    background: var(--bg-white);
    border-radius: 20px;
    margin-top: 2%
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start
}

.product-gallery {
    position: sticky;
    top: 100px
}

.main-image-container {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden
}

.main-image {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease
}

.main-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6
}

.image-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    transform: translateY(-50%);
    pointer-events: none
}

.nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: var(--shadow-md);
    color: var(--text-dark)
}

.nav-btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: var(--shadow-lg)
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none
}

.image-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600
}

.image-thumbnails {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.7;
    background: var(--bg-light)
}

.thumbnail.active {
    border-color: var(--accent-blue);
    opacity: 1;
    transform: scale(1.05)
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.05)
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.thumbnail-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem
}

.product-info {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light)
}

.product-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light)
}

.product-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.95rem
}

.meta-icon {
    color: var(--accent-blue);
    font-size: 1.1rem
}

.price-section {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px
}

.stock-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem
}

.stock-info.in-stock {
    background: var(--success-green);
    color: white
}

.stock-info.out-of-stock {
    background: var(--warning-red);
    color: white
}

.product-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
    flex-wrap: wrap
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    flex: 1;
    min-width: 200px;
    color: var(--text-dark)
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: var(--shadow-md)
}

.btn-primary:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg)
}

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none
}

.btn-secondary {
    background: lightcoral !important;
    color: var(--text-dark);
    border: 2px solid var(--border-medium)
}

.btn-secondary:hover {
    background: coral !important;
    border-color: var(--accent-blue);
    transform: translateY(-2px)
}

.btn-secondary.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue)
}

.btn-icon {
    font-size: 1.2rem
}

.product-details {
    margin-top: 40px
}

.details-section {
    margin-bottom: 30px
}

.details-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light)
}

.description-content {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 1.05rem
}

.specs-grid {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light)
}

.spec-label {
    color: var(--text-gray);
    font-weight: 500
}

.spec-value {
    color: var(--text-dark);
    font-weight: 600
}

.similar-products-section {
    padding: 60px 0;
    background: var(--bg-light);
    border-radius: 20px;
    margin-top: 2%;
    color: black
}

.section-header {
    text-align: center;
    margin-bottom: 40px
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px
}

.similar-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px
}

.similar-product-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block
}

.similar-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue);
    color: inherit;
    text-decoration: none
}

.similar-product-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: var(--bg-light);
    border-radius: 12px
}

.similar-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain
}

.similar-product-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4
}

.similar-product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue)
}

.similar-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--text-gray)
}

.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000
}

.toast {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    color: var(--text-dark)
}

.toast.show {
    transform: translateX(0)
}

.toast.success {
    border-left-color: var(--success-green);
    background: #f0fdf4
}

.toast.error {
    border-left-color: var(--warning-red);
    background: #fef2f2
}

.toast-icon {
    font-size: 1.2rem
}

.loading {
    opacity: 0.7;
    pointer-events: none
}

.btn.loading {
    position: relative;
    color: transparent
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite
}

@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

@media (max-width:1024px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px
    }

    .product-gallery {
        position: static
    }
}

@media (max-width:768px) {
    .product-hero {
        padding: 60px 0 40px
    }

    .hero-content h1 {
        font-size: 2rem
    }

    .product-info {
        padding: 24px
    }

    .product-title {
        font-size: 1.5rem
    }

    .price {
        font-size: 2.5rem
    }

    .product-actions {
        flex-direction: column
    }

    .btn {
        min-width: auto
    }

    .main-image {
        height: 300px
    }

    .thumbnail {
        width: 60px;
        height: 60px
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem
    }

    .similar-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))
    }
}

@media (max-width:480px) {
    .product-meta {
        flex-direction: column;
        gap: 8px
    }

    .specs-grid {
        grid-template-columns: 1fr
    }

    .similar-products-grid {
        grid-template-columns: 1fr
    }
}

.toggle-wishlist-btn {
    background-color: #EF4444
}

.reviews-section {
    padding: 60px 0;
    background: var(--bg-white);
    border-radius: 20px;
    margin-top: 2%
}

.rating-overview {
    margin-bottom: 20px
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem
}

.rating-stars {
    font-size: 1.5rem;
    color: #FFD700
}

.rating-value {
    font-weight: 700;
    color: var(--text-dark)
}

.reviews-count {
    color: var(--text-gray)
}

.add-review-section {
    background: var(--bg-light);
    padding: 30px;
    color: black;
    border-radius: 16px;
    margin-bottom: 30px
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px
}

.rating-input input {
    display: none
}

.rating-input label {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease
}

.rating-input input:checked~label,
.rating-input label:hover,
.rating-input label:hover~label {
    color: #FFD700
}

.review-form textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--accent-blue)
}

.reviews-list {
    margin-top: 40px
}

.review-item {
    background: var(--bg-light);
    color: black;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-blue)
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px
}

.review-rating {
    color: #FFD700;
    font-size: 1.1rem
}

.review-date {
    color: var(--text-light);
    font-size: 0.9rem
}

.review-comment {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 12px
}

.review-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem
}

.status-approved {
    color: var(--success-green)
}

.status-rejected {
    color: var(--warning-red)
}

.status-pending {
    color: var(--accent-blue)
}

.edit-review-link {
    color: var(--accent-blue);
    text-decoration: none
}

.edit-review-link:hover {
    text-decoration: underline
}

.review-actions {
    margin-top: 12px
}

.btn-edit {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem
}

.btn-edit:hover {
    text-decoration: underline
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: var(--text-gray)
}

.login-prompt {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
    margin-bottom: 30px
}

.login-prompt p {
    color: black !important
}

.login-prompt a {
    color: var(--accent-blue);
    text-decoration: none
}

.login-prompt a:hover {
    text-decoration: underline
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px
}

.pagination a {
    padding: 10px 20px;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s ease
}

.pagination a:hover {
    background: #0284c7
}

.pagination .current {
    color: var(--text-gray);
    font-weight: 500
}

.user-review-section {
    color: black;
}