/* =========================================
   Category Pages Styles (for-dogs, for-cats)
   ========================================= */

.category-container {
    padding-top: 0;
    min-height: 100vh;
    background-color: #ffffff;
    font-family: "Montserrat", var(--font-korean);
}

/* Premium Category Hero - matches instinctpetfood.com/dog/ */
.category-hero {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 52vh;
    border-bottom: none;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
    text-align: left;
    margin: 0;
}

.category-hero-dog {
    background-image: url('../images/for-dogs/explore_top.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    background-color: #ffffff; 
}

.category-hero-cat {
    background-image: url('../images/for-cats/explore_cattop.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    background-color: #ffffff;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 40px;
}

.category-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #223327;
    line-height: 1.2;
    margin: 0 0 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0;
    max-width: none;
    text-align: left;
}

.category-hero p {
    display: none;
}

.category-content {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
    text-align: center;
}

.category-placeholder {
    padding: 100px;
    border: 2px dashed #eee;
    border-radius: 20px;
    color: #999;
}

/* Raw Options Carousel Section */
.raw-options-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    margin-top: 50px;
    margin-bottom: 50px;
    padding: 0;
    overflow-x: hidden;
    text-align: center;
    font-family: "Montserrat", var(--font-korean);
}
.raw-options-header {
    text-align: center;
    margin-bottom: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}
.raw-options-header h2 {
    font-size: 2rem;
    color: #223327;
    margin-bottom: 15px;
    font-weight: 800;
}
.raw-options-header p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}
.raw-options-header i {
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}
.raw-carousel-wrapper {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}
.raw-options-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
.raw-options-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}
.raw-options-carousel::-webkit-scrollbar {
    display: none;
}
.raw-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding-bottom: 30px;
}
.raw-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s;
}
.raw-dot.active {
    background: #223327;
}
.raw-option-card {
    display: flex;
    flex-direction: column;
    flex: 0 0 17.5%;
    min-width: 17.5%;
    max-width: 17.5%;
    scroll-snap-align: start;
    background: #d4d4b9;
    border-right: 1px solid #fff;
    height: 300px; /* Increased height by approx 0.3em-0.4em for better balance */
    padding: 30px 10px 85px !important; /* Keep text forced up */
    text-align: center;
    flex-shrink: 0;
    text-decoration: none;
    color: #223327;
    align-items: center;
    box-sizing: border-box;
    cursor: default;
}
.raw-option-card:hover {
    background: #d4d4b9; /* Revert hover to olive */
}
.raw-option-card:active,
.raw-option-card.active {
    background: #EAEBE9 !important; /* Authentic US site background for active cards */
}
.raw-option-img {
    width: 185px;
    height: auto;
    margin: 8px 0 12px;
    object-fit: contain;
}
.raw-option-card h3 {
    font-size: 1rem;
    color: #1a2a40; /* Navy Blue / Ultramarine tint */
    margin-bottom: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}
.raw-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    width: 100%;
}
.bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 12px;
}
.bar {
    width: 5px;
    background: #223327;
}
.bar:nth-child(1) { height: 4px; }
.bar:nth-child(2) { height: 8px; }
.bar:nth-child(3) { height: 12px; }

.bar.empty {
    opacity: 0.2;
}
.bar.half {
    background: linear-gradient(to top, #223327 50%, rgba(34,51,39,0.2) 50%);
}
.level-text {
    font-size: 0.9rem; /* Increased size */
    color: #223327;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Dynamic Tab Panel */
.raw-tab-container {
    background: #fff;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
}
.raw-tab-content {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 60px 40px;
    position: relative;
}
.tab-close-btn {
    position: absolute;
    top: -20px;
    right: 0;
    font-size: 2.5rem;
    color: #ccc;
    background: none;
    border: none;
    cursor: pointer;
    line-height:1;
    z-index: 10;
}
.tab-close-btn:hover { color: #888; }

/* Hero Section */
.tab-hero-section {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.tab-hero-blob {
    position: absolute;
    width: 330px;
    height: 180px;
    background: #fdf2e9;
    border-radius: 400px / 200px; /* Oval shape */
    z-index: 1;
}
.tab-hero-img {
    position: relative;
    z-index: 2;
    height: 230px;
    width: auto;
}

/* Main Info */
.tab-main-info {
    margin-bottom: 40px;
    text-align: center;
}

.tab-title {
    font-size: 2.225rem;
    color: #223327;
    font-weight: 800;
    margin: 0 auto 12px auto;
    letter-spacing: 0.5px;
    width: fit-content;
    padding-bottom: 5px;
    text-transform: uppercase;
    line-height: 1.2;
}

.tab-desc {
    font-size: 1.125rem;
    color: #666;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Icons Row */
.tab-icons-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.tab-icon-item {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
}
.tab-icon-item img {
    width: 68px; /* Reduced from 80px (15% reduction) */
    height: 68px;
    margin-bottom: 12px;
}
.tab-icon-item span {
    display: block;
    font-size: 0.975rem;
    color: #555;
    font-weight: 600;
    line-height: 1.4;
}

/* Benefits List */
.tab-benefits-list {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.tab-benefits-list span {
    font-size: 1.25rem;
    color: #1c2b4d; /* Navy to match title */
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* CTA Wrap */
.tab-cta-wrap {
    margin-bottom: 30px;
}
.tab-link-btn {
    display: inline-block;
    padding: 18px 42px; 
    background: #223327;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem; 
    line-height: 1;
    border-radius: 60px; 
    letter-spacing: 1.5px; 
    border: 3px solid #223327;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
}
.tab-link-btn:hover {
    background: #fff;
    color: #223327;
}

/* Sub-Navigation */
.tab-sub-nav {
    border-top: none;
    padding-top: 0;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    gap: 35px;
    flex-wrap: wrap;
}
.tab-sub-nav a {
    font-size: 0.9375rem;
    color: #888;
    text-decoration: none;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
.tab-sub-nav a:hover { color: #333; }
.tab-sub-nav a.active {
    color: #1c2b4d;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

/* Community */
.community-container {
    padding-top: 100px;
    min-height: 60vh;
}
.community-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.community-section h1 {
    margin-bottom: 16px;
}
.community-section p {
    margin-bottom: 2rem;
}
.community-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}
.community-link {
    color: var(--color-primary);
    font-weight: bold;
}

/* =========================================
   Responsive Adjustments (Mobile)
   ========================================= */
@media (max-width: 768px) {
    /* Hero Banner Mobile Adjustments */
    .category-hero {
        height: 40vh; /* Slightly shorter on mobile */
    }

    .category-hero h1 {
        display: none; /* Hide text as requested */
    }

    .category-hero-dog {
        background-image: url('../images/for-dogs/explore_top.jpg') !important;
        background-position: 75% center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }

    .category-hero-cat {
        background-image: url('../images/for-cats/explore_cattop.jpg') !important;
        background-position: 85% center !important; /* Shifting to focus on the cat on the right */
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }






    /* Product Explorer Carousel - Mobile Scroll Style like US Site */
    .raw-option-card {
        flex: 0 0 50% !important; /* Exactly 2 cards per view */
        min-width: 50% !important;
        max-width: 50% !important;
        height: 250px;
        padding: 20px 10px 65px !important;
        border-right: 1px solid rgba(255,255,255,0.3); /* Subtle separator */
    }

    .raw-option-img {
        width: 130px;
        margin-top: 5px;
    }

    .raw-options-carousel {
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch;
        padding: 0; /* Remove padding to allow cards to hit edges */
    }

    /* Tab content spacing on mobile */
    .raw-tab-content {
        padding: 40px 20px;
    }

    .tab-title {
        font-size: 1.6rem;
    }

    .tab-desc {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }

    .tab-hero-img {
        height: 160px;
    }

    .tab-hero-blob {
        width: 240px;
        height: 130px;
    }

    .tab-icons-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px 10px; /* Vertical gap 20px, horizontal gap 10px */
        margin-bottom: 30px;
    }

    .tab-icon-item {
        flex: 0 0 46%; /* Approx 2 columns */
        min-width: 46%;
        max-width: 46%;
        padding: 5px;
    }

    .tab-icon-item img {
        width: 58px; /* Slightly smaller for mobile grid */
        height: 58px;
    }

    .tab-icon-item span {
        font-size: 0.85rem;
        word-break: keep-all; /* Prevent awkward word breaks in Korean */
    }

    .tab-benefits-list span {
        font-size: 1rem;
    }

    .tab-sub-nav {
        flex-direction: column;
        align-items: center;
        gap: 25px; /* More spacing for vertical stack */
        margin-top: 40px; /* Space from the button above */
    }

    .tab-sub-nav a {
        font-size: 1.1rem; /* Slightly larger for mobile stack */
        letter-spacing: 0.1em;
    }
}

