/* ==========================================================================
   Packing Details page
   Loaded after style.min.css — see resources/views/include/head.blade.php
   Type is the theme's own (Switzer body / Clash Display display). No new
   imports, no JavaScript — layout and responsiveness are pure CSS.
   ========================================================================== */

/* ---------- Category block ---------- */

.packing-cat {
    border: 1px solid #e6e6e6;
    overflow: hidden;
}

.packing-cat + .packing-cat {
    margin-top: 40px;
}

.packing-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 15px;
    background: #9b6300;
    color: #fff;
}

.packing-cat-head h3 {
    font-size: 22px;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #fff;
    margin: 0;
}

.packing-cat-head .view-range {
    font-size: 14px;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
    white-space: nowrap;
    transition: opacity .3s ease-in-out;
}

.packing-cat-head .view-range:hover {
    opacity: .6;
}

/* ---------- Table ----------
   A table on wide screens; below 1200px the responsive block re-lays every
   row out as a card, so it never scrolls sideways. */

.packing-table {
    width: 100%;
    min-width: 940px;
    margin: 0;
}

/* The header is tinted from the brown category bar rather than left grey,
   so the two read as one block. Both lines are locked to the same box:
   fixed padding + vertical-align keeps every column's baseline in line,
   however long the unit text underneath is. */
.packing-table > thead > tr > th {
    background: #faf5ed;
    padding: 13px 12px;
    vertical-align: middle;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .9px;
    text-align: center;
    color: #6b4300;
    border-bottom: 1px solid #ecdfc9;
    white-space: nowrap;
}

.packing-table > thead > tr > th:first-child {
    text-align: left;
    padding-left: 34px;
}

.packing-table > thead > tr > th .u {
    display: block;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .5px;
    color: #a68a5b;
}

.packing-table > tbody > tr > td {
    color: #2b2b2b;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #f1f1f1;
    white-space: nowrap;
}

.packing-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.packing-table > tbody > tr:hover > td {
    background: #fbfaf8;
}

.packing-table td.cell-size {
    text-align: left;
    padding-left: 34px;
    padding-right: 24px;
    min-width: 150px;
}

/* ==========================================================================
   Responsive

   The table needs ~1000px to show all 11 columns honestly, so it only stays
   a table on wide screens. Below 1200px every row is re-laid out as a card
   with each value labelled from its data-label — two cards per line on
   tablet, one on phones. Nothing ever scrolls sideways.
   ========================================================================== */

@media (max-width: 1199px) {

    .packing-cat + .packing-cat {
        margin-top: 30px;
    }

    .packing-cat-head {
        padding: 15px 20px;
    }

    .packing-cat-head h3 {
        font-size: 20px;
    }

    /* No sideways scroll left to manage. */
    .packing-cat .table-responsive {
        overflow-x: visible;
    }

    .packing-table,
    .packing-table > tbody,
    .packing-table > tbody > tr,
    .packing-table > tbody > tr > td {
        display: block;
        width: auto;
        min-width: 0;
    }

    .packing-table > thead {
        /* the header text is repeated per cell through data-label */
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .packing-table > tbody > tr {
        padding: 20px;
        border-bottom: 1px solid #ececec;
    }

    .packing-table > tbody > tr:last-child {
        border-bottom: 0;
    }

    .packing-table > tbody > tr:hover > td {
        background: none;
    }

    .packing-table > tbody > tr > td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
        text-align: right;
        font-size: 15px;
        padding: 8px 0;
        border-bottom: 1px dashed #f0f0f0;
        white-space: normal;
    }

    .packing-table > tbody > tr > td:last-child {
        border-bottom: 0;
        padding-bottom: 0;
    }

    .packing-table > tbody > tr > td::before {
        content: attr(data-label);
        flex: 1 1 auto;
        text-align: left;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: .9px;
        color: #a68a5b;
    }

    /* The size becomes the card's heading. */
    .packing-table td.cell-size {
        display: block;
        padding: 0 0 12px;
        margin-bottom: 8px;
        border-bottom: 1px solid #ececec;
        text-align: left;
        min-width: 0;
    }

    .packing-table td.cell-size::before {
        display: none;
    }

    .packing-table .size-val {
        font-size: 20px;
        color: #6b4300;
    }
}

/* Tablet: two cards per line so the width is not wasted. */
@media (min-width: 768px) and (max-width: 1199px) {

    .packing-table > tbody {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .packing-table > tbody > tr:nth-child(odd) {
        border-right: 1px solid #ececec;
    }

    /* Clear the rule under the final grid line, odd or even row count. */
    .packing-table > tbody > tr:last-child,
    .packing-table > tbody > tr:nth-last-child(2):nth-child(odd) {
        border-bottom: 0;
    }
}

@media (max-width: 575px) {
    .packing-cat-head .view-range {
        display: none;
    }

    .packing-table > tbody > tr {
        padding: 18px 16px;
    }

    .packing-table > tbody > tr > td {
        font-size: 14px;
        gap: 12px;
    }

    .packing-table > tbody > tr > td::before {
        font-size: 10px;
        letter-spacing: .7px;
    }
}

/* ==========================================================================
   Print — a spec sheet is something buyers hand around on paper.
   ========================================================================== */

@media print {

    .theme-main-menu,
    .inner-banner-four,
    #preloader,
    footer,
    .sidebar-nav {
        display: none !important;
    }

    .packing-page {
        padding: 0 !important;
    }

    .packing-cat {
        break-inside: avoid;
        page-break-inside: avoid;
        border-color: #999;
    }

    .packing-cat + .packing-cat {
        margin-top: 18px;
    }

    .packing-cat-head {
        background: none;
        color: #000;
        border-bottom: 2px solid #000;
        padding: 10px 0;
    }

    .packing-cat-head h3 {
        color: #000;
    }

    .packing-cat-head .view-range {
        display: none;
    }

    .packing-table {
        min-width: 0;
    }

    .packing-table > tbody > tr > td,
    .packing-table > thead > tr > th {
        padding: 6px 4px;
        font-size: 10px;
    }
}
