@media (max-width: 768px) {
    .sticky-headerp .leftc,
    .sticky-headerp .rightc {
        display: none !important;
    }

    .sticky-headerp .middlec {
        width: 100% !important;
        float: none !important;
        border-left: 0 !important;
        border-right: 0 !important;
    }

    .sticky-headerp .middle-content {
        margin-top: 12px !important;
        padding: 0 8px 20px;
    }

    .sticky-headerp .bottmcontentmargn {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 10px;
    }

    .sticky-headerp .full_width.productpadtop {
        float: none !important;
        display: block !important;
        flex: 0 0 calc(50% - 5px);
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .sticky-headerp .product1box {
        width: 100% !important;
        padding: 8px !important;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: relative;
        height: 100%;
    }

    .sticky-headerp .prodctbox {
        width: 100% !important;
        display: grid;
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto auto;
        column-gap: 4px;
        row-gap: 4px;
        align-items: start;
        position: relative;
        overflow: visible;
    }

    .sticky-headerp .fodsymbol {
        display: contents;
    }

    .sticky-headerp .ovrlydiv {
        width: 100px !important;
        height: 100px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: #fff;
        flex: 0 0 110px;
        grid-column: 1;
        grid-row: 1;
    }

    .sticky-headerp .ovrlydiv img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center;
        display: block;
    }

    .sticky-headerp .symblword {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        text-align: left !important;
        font-size: clamp(11px, 2.8vw, 13px) !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        display: block;
        overflow: visible;
        margin: 0 !important;
        min-width: 0;
    }

    .sticky-headerp .newarrvl {
        grid-column: 2;
        grid-row: 1;
        position: static !important;
        font-size: 9px !important;
        line-height: 1.1 !important;
        margin: 2px 0 0 !important;
        padding: 0 !important;
        align-self: flex-start;
        justify-self: start;
        text-align: left !important;
        white-space: normal;
    }

    .sticky-headerp .add1.oprice {
        grid-column: 1 / -1;
        grid-row: 2;
        display: grid !important;
        grid-template-columns: 100px 1fr;
        column-gap: 4px;
        align-items: end;
        margin-top: auto;
        padding-top: 2px;
    }

    .sticky-headerp .items_count_box {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        max-width: 100% !important;
    }

    .sticky-headerp .add1.oprice .discount_price {
        display: none !important;
    }

    .sticky-headerp .add1.oprice > span {
        grid-column: 1;
        justify-self: start;
        text-align: left !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        display: inline;
        white-space: nowrap;
    }

    .sticky-headerp .add1.oprice .items_count_box {
        grid-column: 2;
        align-self: end;
        justify-self: end;
        margin: 0 !important;
        display: flex !important;
        justify-content: flex-end;
        max-width: 100% !important;
    }

    .sticky-headerp .add_item {
        width: auto !important;
        min-height: 28px !important;
        font-size: 11px !important;
        padding: 4px 10px !important;
        max-width: 100% !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .sticky-headerp .round {
        font-size: 12px !important;
        line-height: 25px !important;
    }

    .sticky-headerp .rsquare {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .sticky-headerp .full_width.productpadtop {
        flex-basis: 100%;
        width: 100% !important;
        max-width: 100% !important;
    }
}

.sticky-headerp .tk-product-card {
    position: relative;
    border: 1px solid #eee;
    background: #fff;
    padding: 6px 6px 4px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 2px;
    height: auto;
    align-content: start;
}

.sticky-headerp .tk-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 25px;
    height: 25px;
    line-height: 25px;
    border-radius: 50%;
    background-color: #339900;
    color: #fff;
    font-size: 12px;
    text-align: center;
    z-index: 2;
}

.sticky-headerp .tk-media {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 4px;
}

.sticky-headerp .tk-copy {
    display: grid;
    row-gap: 1px;
}

.sticky-headerp .tk-image {
    width: 100%;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sticky-headerp .tk-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.sticky-headerp .tk-code {
    font-size: 11px;
    line-height: 1.1;
    color: #666;
    text-align: center;
    margin: 0;
    display: block;
}

.sticky-headerp .tk-title {
    font-size: 12px;
    line-height: 1.25;
    font-weight: 500;
    color: #111;
    text-align: center;
    margin: 0;
    word-break: break-word;
}

.sticky-headerp .tk-footer {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 1px;
    align-items: end;
}

.sticky-headerp .tk-prices {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    align-items: baseline;
}

.sticky-headerp .tk-actions {
    display: flex;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.sticky-headerp .tk-actions .add_item {
    min-height: 28px;
    font-size: 12px;
    padding: 4px 10px;
    background: #007bff;
    color: #fff;
    border: none;
}

.sticky-headerp .tk-actions .add_item:hover {
    background: #0056b3;
}

/* Reduce overall desktop gutters for product area */
.sticky-headerp .middle-content {
    padding-left: 8px;
    padding-right: 8px;
}

.sticky-headerp .bottmcontentmargn {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.sticky-headerp .bottmcontentmargn > .nac {
    flex: 0 0 100%;
    width: 100%;
    margin: 0 0 8px;
}

.sticky-headerp .full_width.productpadtop {
    margin-right: 0 !important;
}

.sticky-headerp .product1box {
    height: auto !important;
}

@media (max-width: 768px) {
    .sticky-headerp .full_width.productpadtop,
    .sticky-headerp .product1box {
        display: flex !important;
        flex-direction: column;
    }

    .sticky-headerp .tk-product-card {
        position: relative;
        padding: 6px 4px;
        display: grid;
        grid-template-columns: 96px 1fr;
        grid-template-rows: auto 1fr;
        column-gap: 6px;
        row-gap: 3px;
        align-items: start;
        height: 100%;
        flex: 1 1 auto;
        padding-bottom: 42px;
    }

    .sticky-headerp .tk-media {
        display: contents;
    }

    .sticky-headerp .tk-image {
        grid-column: 1;
        grid-row: 1;
        width: 96px;
        height: 96px;
    }

    .sticky-headerp .tk-copy {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-self: start;
        align-content: start;
        min-height: 0;
        padding-right: 2px;
    }

    .sticky-headerp .tk-code {
        text-align: left;
        font-size: 10px;
        display: block;
        margin: 0;
        line-height: 1.1;
        position: static !important;
        white-space: nowrap;
    }

    .sticky-headerp .tk-title {
        text-align: left;
        font-size: 12px;
        line-height: 1.25;
        min-width: 0;
        margin: 0;
        clear: both;
        word-break: break-word;
        overflow-wrap: anywhere;
        white-space: normal !important;
    }

    .sticky-headerp .tk-footer {
        position: absolute;
        left: 4px;
        right: 4px;
        bottom: 6px;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        column-gap: 6px;
        align-items: end;
        width: auto;
        margin: 0 !important;
    }

    .sticky-headerp .tk-prices {
        display: flex !important;
        grid-column: 1;
        grid-row: 1;
        justify-content: flex-start;
        gap: 3px;
        flex-wrap: nowrap !important;
        align-self: end;
        min-width: 0;
        overflow: hidden;
    }

    .sticky-headerp .tk-prices > span {
        white-space: nowrap;
        font-size: 11px;
    }

    .sticky-headerp .tk-actions {
        display: flex !important;
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        align-self: end;
        margin-left: auto;
        white-space: nowrap;
    }

    .sticky-headerp .tk-actions .add_item {
        min-height: 26px;
        font-size: 11px;
        padding: 3px 10px;
    }

    /* Reduce mobile side padding and card gaps */
    .sticky-headerp .middle-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .sticky-headerp .bottmcontentmargn {
        gap: 4px !important;
    }

    .sticky-headerp .bottmcontentmargn > .nac {
        margin: 0 4px 8px;
    }

    .sticky-headerp .full_width.productpadtop {
        flex: 0 0 calc(50% - 2px);
        width: calc(50% - 2px) !important;
        max-width: calc(50% - 2px) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sticky-headerp .rsquare {
        display: none !important;
    }
}

/* Add smooth scroll behavior */
.middle-content {
    scroll-behavior: smooth;
}

/* Navigation buttons fixed at bottom of left column */
.navigation-buttons {
    background-color: #f3f3f3;
    box-sizing: border-box;
}

/* Responsive width adjustments to match left column exactly */
@media (min-width: 1400px) {
    .navigation-buttons {
        width: 180px !important;
        padding: 10px 8px !important;
    }
}

@media (min-width: 968px) and (max-width: 1399px) {
    .navigation-buttons {
        width: 15% !important;
        padding: 10px 8px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .navigation-buttons {
        width: 18% !important;
        padding: 10px 8px !important;
    }
}

/* Mobile: hide navigation buttons when left column is hidden */
@media (max-width: 768px) {
    .navigation-buttons {
        display: none !important;
    }
}

/* Smaller buttons on medium screens */
@media (max-width: 1024px) {
    .navigation-buttons button {
        width: 40px !important;
        height: 40px !important;
        margin: 0 3px !important;
    }
}

@media (max-width: 768px) {
    .sticky-headerp .rightc {
        display: block !important;
        visibility: hidden;
        right: -100% !important;
        z-index: 2001 !important;
    }

    .sticky-headerp .rightc.show {
        display: block !important;
        visibility: visible;
        right: 0 !important;
        z-index: 2001 !important;
    }

    .sticky-headerp .product1box,
    .sticky-headerp .tk-product-card {
        position: relative !important;
        height: 100% !important;
    }

    .sticky-headerp .tk-footer {
        position: absolute !important;
        left: 4px !important;
        right: 4px !important;
        bottom: 6px !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: space-between !important;
        gap: 8px !important;
        width: auto !important;
        margin: 0 !important;
    }

    .sticky-headerp .tk-prices.add1.oprice {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: flex-end !important;
        justify-content: flex-start !important;
        gap: 4px !important;
        min-width: 0 !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sticky-headerp .tk-prices.add1.oprice > span {
        white-space: nowrap !important;
        margin: 0 !important;
    }

    .sticky-headerp .tk-actions.items_count_box {
        display: flex !important;
        align-items: flex-end !important;
        justify-content: flex-end !important;
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sticky-headerp .tk-actions.items_count_box .add_item {
        margin: 0 !important;
    }
}
