/* =========================================================
   HOME – PRODUCT SECTIONS
========================================================= */

.home-product-section {
    margin-bottom: 40px;
}

.home-product-section:last-child {
    margin-bottom: 0;
}

.home-product-section__title {
    margin: 0 0 18px 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-category-title);
}

.home-product-section__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

/* =========================================================
   HOME – PRODUCT CARD
========================================================= */

.home-product-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    min-width: 0;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.home-product-card:hover {
    border-color: var(--color-border-dark);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
    transform: translateY(-1px);
}

.home-product-card__media {
    width: 84px;
    flex: 0 0 84px;
}

.home-product-card__image {
    width: 84px;
    height: 84px;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    background: var(--color-bg-soft-2);
}

.home-product-card__image--empty {
    background: var(--color-bg-soft);
}

.home-product-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.home-product-card__title {
    position: relative;
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}

.home-product-card__title-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
}

.home-product-card__title-text {
    display: -webkit-box;
    line-height: 1.35;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    color: var(--color-text);
}

.home-product-card__title:hover .home-product-card__title-text {
    color: var(--color-primary);
}

.home-product-card__meta {
    font-size: 12px;
    line-height: 1.45;
    color: var(--color-text);
}

.home-product-card__meta > div {
    margin-bottom: 2px;
    overflow-wrap: anywhere;
}

.home-product-card__label {
    font-weight: 700;
    color: var(--color-text-strong);
}

.home-product-card__price {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary-dark);
}

.home-product-card__price span {
    font-weight: 400;
    color: var(--color-text-soft);
}

.home-product-card__availability {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-soft);
    flex-wrap: wrap;
}

.home-product-card__availability-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* =========================================================
   HOME – INFO STRIP
========================================================= */

.rd-strip {
    background: #f3f4f6;
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 40px;
}

.rd-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.rd-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 32px 24px;
    border-radius: 18px;
    background: #ffffff;
    min-height: 220px;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rd-strip-item:hover {
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.10);
    transform: translateY(-2px);
}

.rd-strip-icon-wrap {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rd-strip-icon {
    font-size: 50px;
    line-height: 1;
    color: #2563eb;
}

.rd-strip-content {
    min-width: 0;
    text-align: center;
}

.rd-strip-title {
    margin: 0 0 6px 0;
    font-size: 17px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text-strong);
}

.rd-strip-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-soft);
}


/* =========================================================
   HOME – EXTERNAL LINKS
========================================================= */

.home-external {
    background: var(--color-bg-soft-2);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    margin-bottom: 40px;
    text-align: center;
}

.home-external__title {
    margin: 0 0 28px 0;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-category-title);
}

.home-external__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.home-external__card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 420px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: var(--color-text);
    transition:
        border-color .15s ease,
        box-shadow .15s ease,
        transform .15s ease;
}

.home-external__card:hover,
.home-external__card:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 14px 32px rgba(39, 114, 164, 0.22);
    transform: translateY(-4px);
}

.home-external__image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    background: var(--color-bg-soft);
    transition: transform .25s ease;
}

.home-external__card:hover .home-external__image {
    transform: scale(1.05);
}

.home-external__body {
    padding: 26px 20px 24px;
    text-align: left;
    border-top: 1px solid var(--color-border-light);
}

.home-external__name {
    margin: 0 0 12px 0;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text-strong);
    transition: color .15s ease;
}

.home-external__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-soft);
}

.home-external__card:hover .home-external__name {
    color: var(--color-primary);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1024px) {
    .home-external__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home-external__card {
        flex-direction: column;
    }

    .home-external__image {
        width: 100%;
        height: 160px;
    }

    .home-external__body {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--color-border-light);
    }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1024px) {
    .home-external__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-external__grid {
        grid-template-columns: 1fr;
    }

    .home-external__image {
        height: 160px;
    }
}

/* =========================================================
   HOME – GAUGE STATS (PORTAL NUMBERS)
========================================================= */

.home-gauge-section {
    background: var(--color-bg-soft);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    margin: 40px 0;
    text-align: center;
}

.home-gauge-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}


.home-gauge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.home-gauge-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border-soft);
}

.home-gauge-circle {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px auto;
}

.home-gauge-svg {
    transform: rotate(-90deg);
}

.home-gauge-bg {
    fill: none;
    stroke: var(--color-border-light);
    stroke-width: 10;
}

.home-gauge-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 10;
    stroke-linecap: butt;
    transition: stroke-dashoffset 1s ease;
}

.home-gauge-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-strong);
}

.home-gauge-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.home-gauge-text {
    font-size: 14px;
    color: var(--color-text-soft);
    line-height: 1.5;
}

.home-gauge-progress {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.home-gauge-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text-strong);
    transition: opacity .2s ease;
}

/* =========================================================
   HOME – RESPONSIVE
========================================================= */

@media (max-width: 1024px) {
    .home-product-section__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rd-strip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-gauge-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .home-product-section__title {
        font-size: 18px;
    }

    .home-product-card {
        padding: 14px;
    }

    .home-product-card__media {
        width: 72px;
        flex: 0 0 72px;
    }

    .home-product-card__image {
        width: 72px;
        height: 72px;
    }

    .rd-strip-icon-wrap {
        width: 90px;
        height: 90px;
    }

    .rd-strip-icon {
        font-size: 44px;
    }

    .home-gauge-section {
        padding: 24px 18px;
    }

    .home-gauge-title {
        font-size: 22px;
    }

    .home-gauge-card {
        padding: 24px 18px;
    }

    .home-gauge-circle {
        width: 132px;
        height: 132px;
    }

    .home-gauge-value {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .home-product-section__grid {
        grid-template-columns: 1fr;
    }

    .home-product-card {
        gap: 12px;
        padding: 12px;
    }

    .home-product-card__title {
        font-size: 15px;
    }

    .home-product-card__meta {
        font-size: 11px;
    }

    .home-product-card__price {
        font-size: 13px;
    }

    .rd-strip {
        padding: 20px 16px;
    }

    .rd-strip-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .rd-strip-item {
        padding: 12px;
        gap: 16px;
    }

    .rd-strip-icon-wrap {
        width: 80px;
        height: 80px;
    }

    .rd-strip-icon {
        font-size: 40px;
    }

    .home-gauge-section {
        padding: 20px 16px;
    }

    .home-gauge-title {
        font-size: 20px;
    }
    
    .home-gauge-grid {
        grid-template-columns: 1fr;
    }

    .home-gauge-card {
        padding: 20px 14px;
    }

    .home-gauge-circle {
        width: 120px;
        height: 120px;
    }

    .home-gauge-value {
        font-size: 18px;
    }

    .home-gauge-label {
        font-size: 17px;
    }

    .home-gauge-text {
        font-size: 13px;
    }
    
    .home-external__grid {
        grid-template-columns: 1fr;
    }
    
    .home-external__card {
        min-height: 150px;
    }
}