/* ===================================
   Product Showcase Widget - WordPress
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Exact Figma Colors */
    --ps-black-bg: #000000;
    --ps-light-gray: #F5F5F5;
    --ps-white-bg: #FFFFFF;
    --ps-orange-primary: #E86E3F;
    --ps-olive-green: #6B6E3D;
    --ps-navy-blue: #2C3E50;
    --ps-red-code: #ED1C24;
    --ps-text-white: #FFFFFF;
    --ps-divider-gray: #333333;
}

/* ===================================
   Main Container
   =================================== */

.product-showcase {
    width: 100%;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.product-showcase * {
    font-family: 'Cairo', sans-serif;
}

.product-container {
    width: 100%;
    max-width: 1600px;
    display: grid;
    grid-template-columns: 0.3fr 2fr 2fr;
    min-height: 650px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Left Side: Product Info (Black BG)
   =================================== */

.product-info {
    background: var(--ps-black-bg);
    padding: 3rem 3rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pattern-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    pointer-events: none;
}

.pattern {
    width: 100%;
    height: 100%;
}

.info-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Category */
.product-category {
    font-size: 0.875rem;
    color: var(--ps-text-white);
    font-weight: 400;
    opacity: 0.8;
}

/* Title */
.product-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ps-text-white);
    line-height: 1.3;
    margin: 0;
}

/* Divider */
.divider {
    width: 100%;
    height: 1px;
    background: var(--ps-divider-gray);
    margin: 0.5rem 0;
}

/* Section Labels */
.section-label {
    font-size: 0.9rem;
    color: var(--ps-text-white);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

/* Colors Section */
.product-colors {
    display: flex;
    flex-direction: column;
}

.color-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.color-swatch.active {
    border-color: var(--ps-text-white);
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.1);
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.color-swatch:active {
    transform: scale(1.05);
}

/* Sizes Section */
.product-sizes {
    display: flex;
    flex-direction: column;
}

.sizes-options {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

/* Enhanced Modern Size Option Design */
.size-option {
    min-width: 60px;
    height: 60px;
    padding: 0 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.12) 100%);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: var(--ps-text-white);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
}

/* Gradient Overlay Animation */
.size-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 100%);
    transition: left 0.6s ease;
}

.size-option:hover::before {
    left: 100%;
}

/* Shimmer Effect on Hover */
.size-option::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.size-option:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.22) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.size-option:hover::after {
    opacity: 1;
}

/* Active State - Premium Look */
.size-option.active {
    background: linear-gradient(135deg, var(--ps-white-bg) 0%, #f0f0f0 100%);
    border-color: var(--ps-white-bg);
    color: var(--ps-black-bg);
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4),
        0 0 0 4px rgba(255, 255, 255, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.2);
    animation: pulse-size 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Pulse Animation for Active State */
@keyframes pulse-size {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.4),
            0 0 0 4px rgba(255, 255, 255, 0.15),
            0 8px 16px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(255, 255, 255, 0.6),
            0 0 0 6px rgba(255, 255, 255, 0.2),
            0 10px 20px rgba(0, 0, 0, 0.25);
    }
}

.size-option:active {
    transform: scale(1.02) translateY(0);
    transition: transform 0.1s ease;
}

/* Icon Support (optional - can add checkmark for selected) */
.size-option.active::before {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--ps-orange-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(232, 110, 63, 0.4);
    animation: pop-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Fallback Sizes Bar (when no specific sizes) */
.sizes-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.size-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background: var(--ps-text-white);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Description/Code */
.product-description {
    display: flex;
    flex-direction: column;
}

.product-code {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ps-red-code);
    letter-spacing: 1px;
}

/* Price Display */
.product-price-display {
    margin: 1rem 0;
}

.product-price-display .price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ps-text-white);
}

.product-price-display .price-value .woocommerce-Price-amount {
    color: var(--ps-text-white);
}

/* Buy Button */
.buy-button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--ps-white-bg);
    color: var(--ps-black-bg);
    border: none;
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.buy-button:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.buy-button:active {
    transform: translateY(0);
}

/* ===================================
   Center: Main Product Image
   =================================== */

.product-center {
    background: var(--ps-light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
}

.product-image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 10%;
    left: 10%;
    background: var(--ps-orange-primary);
    color: var(--ps-text-white);
    padding: 0.7rem 1.3rem;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(232, 110, 63, 0.3);
    z-index: 10;
}

.badge-icon {
    font-size: 1rem;
}

/* Hotspots */
.hotspot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--ps-orange-primary);
    border: 2px solid var(--ps-white-bg);
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.hotspot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(232, 110, 63, 0.4);
    border-radius: 50%;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse-ring {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.hotspot-1 {
    top: 40%;
    right: 28%;
}

.hotspot-2 {
    bottom: 35%;
    left: 25%;
}

/* Hotspot Tooltip */
.hotspot-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Right Side: Thumbnails (White BG)
   =================================== */

.product-thumbnails {
    background: var(--ps-white-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1rem;
}

.thumbnail {
    width: 80px;
    height: 80px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    background: var(--ps-white-bg);
    border: 2px solid transparent;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.thumbnail:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.thumbnail.active {
    border-color: var(--ps-orange-primary);
    box-shadow: 0 4px 12px rgba(232, 110, 63, 0.25);
}

.thumbnail.active img {
    opacity: 1;
}

/* ===================================
   Animations
   =================================== */

.product-image-container img.changing {
    opacity: 0.3;
    transform: scale(0.95);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

/* Notification */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.product-showcase-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: #E86E3F;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(232, 110, 63, 0.4);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1200px) {
    .product-container {
        grid-template-columns: 1fr minmax(350px, 500px) 100px;
    }

    .product-info {
        padding: 3rem 2rem;
    }

    .product-title {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .product-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .product-info {
        order: 3;
        padding: 3rem 2rem;
    }

    .product-center {
        order: 1;
        min-height: 400px;
    }

    .product-thumbnails {
        order: 2;
        flex-direction: row;
        padding: 1.5rem;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .product-info {
        padding: 2rem 1.5rem;
    }

    .product-title {
        font-size: 1.75rem;
    }

    .product-center {
        padding: 2rem;
        min-height: 350px;
    }

    .thumbnail {
        width: 60px;
        height: 60px;
    }

    .product-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {

    .product-thumbnails,
    .buy-button,
    .hotspot {
        display: none;
    }

    .product-container {
        grid-template-columns: 1fr 1fr;
    }
}