:root {
    --color-background: #161617;
    --color-inside-product: #0c0c0d;
    --color-pure-black: #000000;
    --color-border: #545153;

    --border-radius: 15px;
}

/* Back link */
.product-back-link {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.15s, color 0.15s;
}

.product-back-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: white;
}

#product-view-container{
    display: grid;
    grid-template-columns: 50% 1fr;
    padding: 20px 0;

    background-color: var(--color-inside-product); 
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius)
}

body.products-show {
  background-color: var(--color-background);
}
/* ========================== */
/* == First column == */
#product-view-first-column{
    grid-column: 1;

    background-color: var(--color-pure-black);
    border: 2px solid black;
    border-radius: var(--border-radius);
    margin: 0 20px;
    padding: 10px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#product-image-container{
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
}

#product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.25s ease;
}

#product-image-container img[hidden] {
    display: none;
}

/* ---- Carousel arrows ---- */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;

    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: rgba(255, 255, 255, 0.8);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.carousel-prev {
    left: 8px;
}

.carousel-next {
    right: 8px;
}

/* ---- Carousel dots ---- */
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, transform 0.15s;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.carousel-dot.active {
    background: white;
    transform: scale(1.25);
}

/* ---- Carousel counter ---- */
.carousel-counter {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 2;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 8px;
    border-radius: 10px;
    pointer-events: none;
}

#product-view-first-column .title {
    font-size: 24px;
    text-align: center;
    font-weight: 1000;
    padding: 12px 0;
}

#product-view-first-column .description {
    font-size: 14px;
    align-self: flex-start;
    padding: 15px;
}

.description li {
    list-style: circle;
    padding: 5px;
}
.description ul {
  padding-left: 20px;
}

/* ========================== */
/* == Second column == */
.general-box {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    padding: 16px;
    margin: 8px 12px;

    transition: border-color 0.15s, box-shadow 0.15s;
}

#product-view-second-column{
    grid-column: 2;
}

.product-separate-variant {
    display: flex;
    cursor: pointer;
    align-items: flex-start;
    gap: 12px;

    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);

    padding: 16px;
    margin: 8px 12px;

    transition: border-color 0.15s, box-shadow 0.15s;
}

.product-separate-variant:hover {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* Variant info (left side) */
.product-separate-variant .variant-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;

}

.product-separate-variant .variant-info p:first-child {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 1000;
    font-size: 1.2rem;
}

.product-separate-variant .variant-info .variant-description{
    opacity: 0.8;
}

.product-separate-variant .variant-info .variant-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-top: 8px;
}

/* Variant actions (right side) */
.product-separate-variant .variant-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.product-separate-variant .variant-stock {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.product-separate-variant form {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-separate-variant form label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Add to cart stylings */
.product-separate-variant form input[type="number"] {
    width: 52px;
    padding: 5px 8px;
    font-size: 0.85rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.07);
    color: white;
    outline: none;
}

.product-separate-variant form input[type="submit"] {
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: white;
    color: #0d1321;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: opacity 0.15s;
}

.product-separate-variant form input[type="submit"]:hover {
    opacity: 0.85;
}

/* ========================== */
/* == Variant Radio Buttons == */
.product-separate-variant {
    cursor: pointer;
}

.product-separate-variant input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;

    width: 18px;
    height: 18px;
    min-width: 18px;

    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background-color: transparent;

    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 3px;
}

.product-separate-variant input[type="radio"]:hover:not(:checked) {
    border-color: rgba(255, 255, 255, 0.5);
}

.product-separate-variant input[type="radio"]:checked {
    border-color: white;
    background-color: white;
    box-shadow: inset 0 0 0 4px var(--color-inside-product);
}

/* Highlight card when selected */
.product-separate-variant:has(input[type="radio"]:checked) {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ========================== */
/* == Description typography == */
.description h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #f0f0f0;
    margin: 1.2em 0 0.5em;
    padding-bottom: 4px;
    border-bottom: 0.5px solid #2a2a2c;
}

.description h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ddd;
    margin: 1em 0 0.4em;
}

.description h3, .description h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ccc;
    margin: 0.8em 0 0.3em;
}

.description p {
    margin: 0.5em 0;
    line-height: 1.6;
    color: #bbb;
}

.description strong {
    color: #eee;
    font-weight: 600;
}

.description ul, .description ol {
    padding-left: 20px;
    margin: 0.4em 0;
}

.description li {
    list-style: circle;
    padding: 3px 0;
    color: #bbb;
    line-height: 1.5;
}

.description a {
    color: #8ab4f8;
    text-decoration: none;
}

.description a:hover {
    text-decoration: underline;
}

/* ========================== */
/* == Quantity row == */
.quantity-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.live-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0 0 10px;
}

.increase-decrease {
    width: 36px;
    height: 36px;
    border: 0.5px solid #3a3a3c;
    background: #1a1a1b;
    color: #ccc;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}

.increase-decrease:first-of-type {
    border-radius: 8px 0 0 8px;
}

.increase-decrease:last-of-type {
    border-radius: 0 8px 8px 0;
}

.increase-decrease:hover {
    background: #2a2a2c;
    color: white;
}

/* ---- Hide browser number spinners ---- */
.quantity-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-row input[type="number"]::-webkit-inner-spin-button,
.quantity-row input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-row input[type="number"] {
    width: 48px;
    height: 36px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: #0c0c0d;
    border: 0.5px solid #3a3a3c;
    border-left: none;
    border-right: none;
    outline: none;
    padding: 0;
    box-sizing: border-box;
}

/* ========================== */
/* == Stripe / instant-payment area == */
.stripe-instant .general-box {
    margin-bottom: 0;
}

.stripe-instant .general-box input[type="email"] {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    background: #0c0c0d;
    border: 0.5px solid #3a3a3c;
    border-radius: 8px;
    color: #ddd;
    outline: none;
    margin-top: 6px;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.15s;
}

.stripe-instant .general-box input[type="email"]:focus {
    border-color: rgba(255, 255, 255, 0.35);
}

.stripe-instant .general-box label {
    font-size: 13px;
    color: #888;
}

.stripe-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.stripe-button:hover {
    background: rgba(255, 255, 255, 0.75);
}

.stripe-logo {
    height: 24px;
    display: block;
    margin: 0 auto;
}

.payment-methods {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 8px 0 0;
}

/* ========================== */
/* == Mobile responsiveness == */
@media (max-width: 768px) {
    #product-view-container {
        grid-template-columns: 1fr;
        padding: 10px 0;
        border-radius: 0;
        border: none;
        background: transparent;
    }

    #product-view-first-column {
        grid-column: 1;
        margin: 0 0 12px;
        border-radius: 12px;
        padding: 12px;
    }

    #product-view-second-column {
        grid-column: 1;
    }

    #product-image-container {
        height: 250px;
    }

    .product-separate-variant {
        margin: 8px 0;
    }

    .description h1 {
        font-size: 1.1rem;
    }
}

/* ========================== */
/* == Image Lightbox == */
#image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    animation: lightbox-in 0.15s ease forwards;
}

#image-lightbox.fade-out {
    animation: lightbox-out 0.15s ease forwards;
}

@keyframes lightbox-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lightbox-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

#image-lightbox img {
    width: 90vw;
    height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

#image-lightbox .lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

#image-lightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#image-lightbox .lightbox-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border-radius: 10px;
    pointer-events: none;
}

#image-lightbox .lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

#image-lightbox .lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

#image-lightbox .lightbox-prev {
    left: 16px;
}

#image-lightbox .lightbox-next {
    right: 16px;
}

#image-lightbox .lightbox-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
}

#image-lightbox .lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, transform 0.15s;
}

#image-lightbox .lightbox-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

#image-lightbox .lightbox-dot.active {
    background: white;
    transform: scale(1.25);
}