/* ===========================
   PRODUCT DETAILS STYLES
   =========================== */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
}

/* ===========================
   PRODUCT DETAILS WRAPPER
   =========================== */

.product-details-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: 40px;
}

/* ===========================
   PRODUCT SECTION
   =========================== */

.product-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===========================
   PRODUCT IMAGE
   =========================== */

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

.product-image-container {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 0.6s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.product-badge {
    position: absolute;
    top: 20px;
    right: 20px;
}

.badge-in-stock,
.badge-out-of-stock,
.badge-limited {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-in-stock {
    background: var(--success-color);
    color: var(--bg-white);
}

.badge-out-of-stock {
    background: var(--error-color);
    color: var(--bg-white);
}

.badge-limited {
    background: var(--warning-color);
    color: var(--bg-white);
}

/* ===========================
   PRODUCT INFO
   =========================== */

.product-info-section {
    animation: slideDown 0.6s ease-out 0.1s both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.product-price-section {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 12px;
}

.product-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}



/* ===========================
   PRODUCT DETAILS BOX
   =========================== */

.product-details-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.product-details-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-details-box p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* ===========================
   PRODUCT ACTIONS
   =========================== */

.product-actions {
    display: flex;
    gap: 16px;
}

.add-to-cart-form,
.wishlist-form {
    flex: 1;
}

.btn-add-cart,
.btn-wishlist {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.btn-add-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-add-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-wishlist {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-wishlist:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(245, 158, 11, 0.1);
}

.btn-wishlist.active {
    border-color: var(--error-color);
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
}

/* ===========================
   PRODUCT DETAILS SECTION
   =========================== */

.product-details-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.details-container {
    max-width: 100%;
}

.product-details-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.product-details-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    padding: 24px;
    border-radius: 8px;
}

.product-details-box p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

.product-description-box {
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.product-description-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description-box p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* ===========================
   REVIEWS SECTION
   =========================== */

.reviews-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.reviews-container {
    max-width: 100%;
}

.reviews-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.reviews-list {
    display: grid;
    gap: 24px;
}

/* ===========================
   REVIEW CARD
   =========================== */

.review-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    background: var(--bg-light);
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.review-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.review-header {
    margin-bottom: 16px;
}

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

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-light);
}

.reviewer-details h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px 0;
}

.review-rating {
    display: flex;
    gap: 4px;
}

.review-rating i {
    color: #fbbf24;
    font-size: 14px;
}

.review-text {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* ===========================
   NO REVIEWS
   =========================== */

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.no-reviews i {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
    display: block;
}

.no-reviews p {
    font-size: 16px;
    margin: 0;
}

/* ===========================
   PRODUCT NOT FOUND
   =========================== */

.product-not-found {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.not-found-content {
    text-align: center;
}

.not-found-content i {
    font-size: 80px;
    color: var(--border-color);
    margin-bottom: 20px;
    display: block;
}

.not-found-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.not-found-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.btn-back {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--bg-white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    gap: 8px;
}

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

/* ===========================
   TOAST NOTIFICATION
   =========================== */

.toast-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--bg-white);
    border-left: 4px solid var(--success-color);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.error {
    border-left-color: var(--error-color);
}

.toast-notification.error .toast-content {
    color: var(--error-color);
}

.toast-notification.error i {
    color: var(--error-color);
}

.toast-notification.success i {
    color: var(--success-color);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--success-color);
    font-weight: 600;
    font-size: 14px;
}

.toast-notification i {
    font-size: 20px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
    .product-container {
        gap: 40px;
    }

    .product-title {
        font-size: 28px;
    }

    .product-price {
        font-size: 28px;
    }

    .product-section {
        padding: 30px;
    }

    .reviews-section {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-image-section {
        position: relative;
        top: auto;
    }

    .product-section {
        padding: 20px;
    }

    .reviews-section {
        padding: 20px;
    }

    .product-title {
        font-size: 24px;
    }

    .product-price {
        font-size: 24px;
    }

    .product-actions {
        flex-direction: column;
    }

    .reviews-section h2 {
        font-size: 24px;
    }

    .review-card {
        padding: 16px;
    }

    .toast-notification {
        right: 10px;
        left: 10px;
        transform: translateY(-400px);
    }

    .toast-notification.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .product-details-wrapper {
        padding: 20px 10px;
    }

    .product-section {
        padding: 15px;
        margin-bottom: 20px;
    }

    .product-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .product-price {
        font-size: 20px;
    }

    .product-price-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .product-description {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .product-details-box {
        padding: 15px;
        margin-bottom: 20px;
    }

    .product-details-box h3 {
        font-size: 14px;
    }

    .product-details-box p {
        font-size: 12px;
    }

    .btn-add-cart,
    .btn-wishlist {
        padding: 12px 16px;
        font-size: 13px;
    }

    .reviews-section {
        padding: 15px;
    }

    .reviews-section h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .review-card {
        padding: 12px;
        margin-bottom: 0;
    }

    .reviewer-avatar {
        width: 40px;
        height: 40px;
    }

    .reviewer-details h4 {
        font-size: 14px;
    }

    .review-text {
        font-size: 12px;
    }

    .not-found-content i {
        font-size: 60px;
    }

    .not-found-content h2 {
        font-size: 24px;
    }

    .not-found-content p {
        font-size: 14px;
    }
}