/* Product Template Styles */

.card-wrapper {
    max-width: 1100px;
    margin: 0.5rem auto;
}

.product-showcase-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    color: #606167;
    /* overflow: hidden removed — arrows must not be clipped */
}

.product-showcase-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-display {
    position: relative;
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
}

.img-showcase {
    display: flex;
    width: 100%;
    will-change: transform;
}

.img-showcase picture {
    display: block;
    flex: 0 0 100%;
    min-width: 0;
    width: 100%;
}

.img-showcase img {
    width: 100% !important;
    height: auto;
    display: block;
}

/* Desktop hover styling for click-to-advance indicator */
@media (hover: hover) {
    .img-display {
        cursor: pointer;
    }
}

/* Thumbnail row: flex siblings — arrows always outside images */
.img-select-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    width: 100%;
    justify-content: center;
}

.img-select-container {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.img-select {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    will-change: transform;
}

.img-select::-webkit-scrollbar {
    display: none;
}

.img-item {
    flex: 0 0 22%;
    /* Fixed 4 items layout */
    padding: 0 0.3rem;
}

@media screen and (max-width: 768px) {
    .img-item {
        flex: 0 0 22%;
    }
}

@media screen and (max-width: 480px) {
    .img-item {
        flex: 0 0 22%;
    }
}

.img-item-inner {
    width: 100%;
    height: auto;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    background: #fff;
}

.img-item img {
    width: 100%;
    height: auto;
    display: block;
}

.img-item-inner:hover,
.img-item.active .img-item-inner {
    border-color: #e97770;
    box-shadow: 0 4px 12px rgba(233, 119, 112, 0.15);
}

.img-item-inner:focus-visible {
    outline: 2px solid #e97770;
    outline-offset: 2px;
}

/* Nav buttons as flex siblings — always outside the image area */
/* Nav buttons removed */
.img-select-nav {
    display: none;
}

.product-content {
    padding: 2rem 1rem;
}

.box .product-title {
    padding: 0.5em 0;
    font-size: 1.4rem;
}

.product-title {
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    line-height: 1.25em;
    color: #484d55;
    text-transform: uppercase;
    margin: 0 0 0.5em 0;
    position: relative;
    padding-bottom: 0.5em;
}

.product-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 60px;
    background: #b8463f;
}



.product-price {
    margin: 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.new-price span {
    color: #b8463f;
}

.product-detail h2 {
    text-transform: capitalize;
    color: #444;
    padding-bottom: 0.6rem;
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

.product-detail p {
    color: #606167;
    font-size: 0.95rem;
    padding: 0.3rem 0;
}

.purchase-info {
    margin: 2rem 0;
}

.purchase-info .button {
    line-height: 1.3;
    padding: 1.15em 2.5em 1.05em 2.5em;
}

.purchase-info .button span {
    display: block;
    font-size: 0.6em;
    text-transform: none;
    text-decoration: none;
    font-weight: normal;
    margin-top: 2px;
    opacity: 0.8;
}

@media screen and (min-width: 992px) {
    .card {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 2.5rem;
    }

    .product-imgs {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .product-content {
        padding-top: 0;
    }
}

/* Product navigation styling */
.product-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.product-navigation a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-navigation a:hover {
    color: #b8463f;
}

.product-navigation .back-to-collection {
    font-weight: 600;
    color: #555;
    background: #fcfcfc;
    padding: 0.35rem 1.15rem;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
}

.product-navigation .back-to-collection:hover {
    background: #ffffff;
    border-color: #b8463f;
    color: #b8463f;
    box-shadow: 0 2px 8px rgba(233, 119, 112, 0.08);
}

.product-navigation .disabled {
    color: #ccc;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media screen and (max-width: 480px) {
    .product-navigation {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }

    .product-navigation a span {
        display: none;
        /* Hide text on small screens, keep icons */
    }

    .product-navigation .back-to-collection span {
        display: inline;
        /* Keep 'Kolekcja' text readable */
    }
}

/* Breadcrumbs styling */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0.25rem;
    font-size: 0.8rem;
    color: #888;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin: 0 0.5rem;
    color: #ccc;
    font-size: 0.75rem;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.breadcrumbs a:hover {
    color: #b8463f;
}

.breadcrumbs .current-crumb {
    color: #606167;
    font-weight: 500;
}

/* Accessibility helper to hide text visually but keep it for SEO & Screen Readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
