/* =========================================
   Product Page Styles
   ========================================= */

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}
.breadcrumb-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-link:hover {
    color: #d1562b;
}
.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}
.breadcrumb-current {
    color: #333;
    font-weight: 700;
}

/* Product Detail Container */
.product-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 80px; /* Increased top padding to give space from the menu */
    background-color: #ffffff;
}
.product-content-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
    margin-top: 60px; /* Increased margin for better separation from breadcrumbs */
    margin-bottom: 60px;
    padding-bottom: 60px;
    position: relative;
}
.product-content-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* Replaced 100vw with 100% to prevent horizontal scroll */
    height: 10px;
    background-color: #223327;
}

/* Gallery */
.gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    max-width: 500px;
}
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
    /* overflow: visible; */
}
.gallery-image-wrapper {
    position: relative;
    width: 480px;
    height: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    background-color: #fff;
}
.zoom-lens {
    position: absolute;
    border: 2px solid #d1562b;
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.25);
    display: none;
    pointer-events: none;
    z-index: 10;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(209,86,43,0.3);
}
.zoom-window {
    position: fixed;
    width: 460px;
    height: 460px;
    border: 2px solid #e0e0e0;
    background-repeat: no-repeat;
    display: none;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 0 12px 48px rgba(0,0,0,0.22);
    pointer-events: none;
    image-rendering: -webkit-optimize-contrast; /* 크롬/사파리 선명도 최적화 */
    image-rendering: high-quality;
    will-change: background-position, background-size;
    -webkit-font-smoothing: antialiased;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0); /* 하드웨어 가속 */
}
.gallery-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease-in-out;
    opacity: 1;
}
.is-wet-product .gallery-main-image {
    padding: 90px; /* Further reduced visual size for canned products to match other products */
}
.is-mixer-product .gallery-main-image {
    padding: 45px; /* Slightly smaller visual size for mixer products than kibble */
}
.zoom-trigger-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ffffff;
    border: 1.5px solid #d1562b; /* Instinct orange */
    border-radius: 2px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #d1562b;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 15;
    transition: all 0.2s ease;
}
.zoom-trigger-btn:hover {
    transform: scale(1.05);
    background-color: #fff;
    border-color: #a8421e;
    color: #a8421e;
}
.zoom-trigger-btn svg {
    width: 16px;
    height: 16px;
}
.gallery-nav-button {
    background-color: #d2d4ba; /* Beige color from project */
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #223327;
    transition: all 0.2s;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.gallery-nav-button:hover {
    background-color: #c4c6ac;
    transform: translateY(-50%) scale(1.05);
}
.gallery-prev {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
}
.gallery-next {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-dots {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}
.gallery-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background-color: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}
.gallery-dot.active {
    border-color: #333;
    background-color: #333;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    color: #333;
    flex: 1;
    position: relative;
}
.brand-name {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    color: #555;
}
.product-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: #223327;
    margin-top: 20px; /* Added margin to push title down as requested */
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}
.product-description {
    margin-top: 2px;
    margin-bottom: 20px;
    color: #223327;
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.select-wrapper {
    position: relative;
    width: 100%;
    max-width: 180px;
    margin-bottom: 30px;
}
.select-box {
    width: 100%;
    padding: 12px 30px 12px 0;
    font-size: 16px;
    color: #555;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #999;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.select-box:focus, .select-box:hover {
    border-bottom-color: #333;
}
.select-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.benefits-list li {
    position: relative;
    padding-left: 18px;
    font-size: 15px;
    line-height: 1.5;
    color: #555;
}
.benefits-list li::before {
    content: "•";
    font-size: 28px;
    position: absolute;
    left: 0;
    top: -10px;
    color: #223327;
}
.available-sizes {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin-top: auto;
}

/* Product More */
.product-more-container {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 60px 20px;
    font-family: Arial, Helvetica, var(--font-korean);
    color: #333;
}
.product-more-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
    gap: 40px;
}
.product-more-left {
    flex: 1;
    max-width: 600px;
}
.product-more-right {
    flex: 1;
    position: relative;
    min-height: 400px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.product-more-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: #223327;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
    white-space: normal; /* Changed from nowrap to normal for mobile responsiveness */
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.feature-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}
.check-icon {
    flex-shrink: 0;
    margin-top: 2px;
}
.feature-text {
    display: flex;
    flex-direction: column;
}
.feature-title {
    font-size: 17px;
    font-weight: 700;
    color: #223327;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.feature-desc {
    font-size: 16px;
    color: #777;
    line-height: 1.5;
    margin: 0;
    max-width: 450px;
}
.product-more-image-bg {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 80%;
    height: 80%;
    background-color: #d2d4ba;
    z-index: 0;
}
.product-more-bowl-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-more-bowl-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}
.is-wet-product .product-more-bowl-image {
    max-width: 80%;
}

/* Accordion */
.accordion-section {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.accordion-item {
    border-top: 2px solid #223327;
}
.accordion-item:last-child {
    border-bottom: 2px solid #223327;
}
.accordion-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}
.accordion-title {
    font-size: 18px;
    font-weight: 700;
    color: #223327;
    letter-spacing: 0.5px;
}
.accordion-icon {
    font-size: 24px;
    font-weight: 300;
    color: #223327;
}
.accordion-content-wrapper {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
}
.accordion-content {
    padding: 0 0 25px 0;
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}
.nutrition-header {
    color: #223327;
    font-weight: 800;
    margin-top: 20px;
    margin-bottom: 10px;
    display: block;
    font-size: 17px;
}
.nutrition-text {
    color: #555;
    margin-bottom: 10px;
    display: block;
}
.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.nutrition-table td {
    padding: 8px 0;
    border-bottom: 1px solid #223327;
    font-size: 15px;
}
.nutrition-label {
    color: #223327;
    font-weight: 700;
    font-size: 17px;
}
.nutrition-value {
    text-align: right;
    color: #555;
    padding-right: 0 !important;
    white-space: nowrap;
}
.nutrition-footer {
    font-size: 13px;
    color: #7d847c;
    line-height: 1.6;
    word-break: keep-all;
}

/* New Nutrition Grid Styles */
.nutrition-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0 4%;
    width: 100%;
}
.nutrition-grid.is-pouch {
    width: 48%;
    max-width: none;
}
.nutrition-column-group {
    width: 48%;
    display: flex;
    flex-direction: column;
}
.nutrition-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #223327;
}
.nutrition-row.spacer {
    border-bottom: none !important;
}
body.is-mixer-product .nutrition-row, 
body.is-can-product .nutrition-row,
body.is-pouch-product .nutrition-row,
body.is-cup-product .nutrition-row {
    padding: 18px 0;
}
.nutrition-grid.is-pouch .nutrition-column-group {
    width: 100%;
}
.nutrition-grid.is-pouch .nutrition-row {
    width: 100%;
    padding: 18px 0; /* Increased to match other products and provide better spacing as requested */
}
.nutrition-grid.is-pouch .nutrition-label {
    font-size: 16px;
    line-height: 1.2;
}
.nutrition-grid.is-pouch .nutrition-value {
    font-size: 15.5px;
    line-height: 1.2;
}
.nutrition-grid .nutrition-label {
    font-size: 17px;
    font-weight: 700;
    color: #223327;
}
.nutrition-grid .nutrition-value {
    font-size: 16px;
    color: #555;
    text-align: right;
}
.nutrition-footer-row {
    width: 100%;
    font-size: 11.5px;
    color: #7d847c;
    padding-top: 10px;
    letter-spacing: -0.5px;
    text-align: right;
}

.nutrition-row.disclaimer {
    border-bottom: none !important;
    align-items: flex-start;
}
.nutrition-row.disclaimer .nutrition-label {
    color: #7d847c !important;
    font-size: 10.5px !important;
    font-weight: normal !important;
    line-height: 1.3;
    padding-top: 2px;
}
.nutrition-row.disclaimer .nutrition-value {
    display: none;
}

/* Dog Pouch specific nutrition styles */
.dog-pouch-nutrition {
    max-width: 50% !important;
}
.dog-pouch-nutrition .nutrition-header {
    color: #ed6e1b;
}
.dog-pouch-nutrition .nutrition-table td {
    border-bottom: 1px solid #ed6e1b;
}
.dog-pouch-nutrition .nutrition-label {
    color: #ed6e1b;
}
@media (max-width: 768px) {
    .dog-pouch-nutrition {
        max-width: 100% !important;
    }
}
    padding-top: 0 !important;
}

/* Feeding Guidelines */
.feeding-guidelines {
    padding-top: 10px;
    color: #666;
}
.feeding-title {
    font-size: 18px;
    font-weight: 800;
    color: #223327;
    margin-bottom: 20px;
    display: block;
}
.feeding-intro {
    font-size: 15px;
    margin-bottom: 10px;
    line-height: 1.8;
    color: #666;
}
.feeding-intro p {
    margin: 0 0 4px 0;
}
.feeding-table-header {
    font-size: 16px;
    font-weight: 700;
    color: #223327;
    margin-top: 30px;
    margin-bottom: 15px;
}
.feeding-table {
    width: 100% !important;
    max-width: 450px !important;
    margin: 0 0 25px 0 !important;
    border-collapse: collapse;
    border: 1px solid #ccc;
    display: table !important;
    align-self: flex-start !important;
}
.feeding-table th {
    background-color: #223327;
    color: #fff;
    font-weight: 700;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #223327;
    font-size: 15px;
}
.feeding-table td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #ccc;
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}
.fraction {
    font-size: 1.3em;
    margin-left: 3px;
}
.feeding-footer-section {
    font-size: 14px;
    margin-top: 15px;
    line-height: 1.8;
    color: #555;
}
.feeding-bold {
    font-weight: 700;
    color: #555;
}/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox.show {
    display: flex;
    opacity: 1;
}
.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
.lightbox.show .lightbox-content {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.lightbox-close:hover {
    color: #d1562b;
}
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 60px;
    font-weight: 200;
    cursor: pointer;
    padding: 20px;
    transition: color 0.2s;
}
.lightbox-nav:hover {
    color: #d1562b;
}
.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

@media (max-width: 768px) {
    .product-container {
        padding: 20px 15px 120px; /* Increased bottom padding for the fixed nav */
        overflow-x: hidden;
    }
    .product-content-wrapper {
        flex-direction: column;
        gap: 40px;
    }
    .product-content-wrapper::after { height: 4px; }
    .gallery-container { max-width: 100%; }
    .gallery-image-wrapper { width: 100%; height: auto; aspect-ratio: 1; } /* Adaptive height */
    .gallery-main-image { max-height: 350px; }
    .gallery-nav-button { width: 40px; height: 40px; }
    .gallery-prev { left: 0px; }
    .gallery-next { right: 0px; }
    .product-title { font-size: 26px; word-break: keep-all; }
    .product-description { font-size: 19px; word-break: keep-all; }
    .product-more-top { flex-direction: column; }
    .product-more-title { font-size: 24px; white-space: normal; } /* Smaller title for mobile */
    .product-more-right { width: 100%; min-height: 300px; justify-content: center; }
    .product-more-image-bg { width: 100%; height: 70%; }
    .product-more-bowl-wrapper { right: 0; }
    .zoom-window { display: none !important; }
    
    .lightbox-close { font-size: 40px; top: 15px; right: 20px; }
    .lightbox-nav { font-size: 40px; padding: 10px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    /* Adjust feeding table for small screens */
    .feeding-table {
        font-size: 13px;
        width: 100% !important;
    }

    /* Nutritional Info responsive */
    .caloric-table {
        width: 100% !important;
    }
    .nutrition-column-group {
        width: 100%;
    }
    .nutrition-row {
        width: 100%;
    }
    body.is-mixer-product:not(.is-tranquility) .nutrition-row,
    body.is-can-product .nutrition-row,
    body.is-pouch-product .nutrition-row,
    body.is-cup-product .nutrition-row {
        padding: 18px 0; /* Increased to 18px for more spacious consistent spacing as requested */
    }
    .nutrition-row.spacer {
        display: none !important; /* Hide spacers on mobile globally as requested */
    }
    .nutrition-footer-row {
        white-space: normal;
        line-height: 1.4;
    }
}
