/* ==========================================================================
   Technotech — Shop / Archive Page Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   LAYOUT — full width, no sidebar
   -------------------------------------------------------------------------- */

body.tt-shop-page .col-full {
    max-width: 1300px !important;
    box-sizing: border-box !important;
    padding: 0 32px !important;
}

body.tt-shop-page .content-area {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

body.tt-shop-page #secondary,
body.tt-shop-page .widget-area {
    display: none !important;
}

body.tt-shop-page .site-main {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hide default WooCommerce products header (we render our own) */
body.tt-shop-page .woocommerce-products-header {
    display: none !important;
}

/* --------------------------------------------------------------------------
   SHOP HEADER
   -------------------------------------------------------------------------- */

.tt-shop-header {
    padding: 32px 0 8px;
}

.tt-shop-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
}

.tt-shop-count {
    font-weight: 400;
    color: #9ca3af;
    font-size: 22px;
}

.tt-shop-desc {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    max-width: 600px;
}

/* --------------------------------------------------------------------------
   CATEGORY FILTER BAR
   -------------------------------------------------------------------------- */

.tt-filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 16px 0 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 28px;
}

.tt-filter-pill {
    display: inline-block;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.tt-filter-pill:hover {
    background: #fff;
    border-color: #d35400;
    color: #d35400;
}

.tt-filter-pill.active {
    background: #d35400;
    border-color: #d35400;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 767px) {
    .tt-filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 16px;
        gap: 6px;
        scrollbar-width: none;
    }
    .tt-filter-bar::-webkit-scrollbar {
        display: none;
    }
    .tt-filter-pill {
        padding: 6px 14px;
        font-size: 13px;
    }
}

/* --------------------------------------------------------------------------
   SORTING DROPDOWN
   -------------------------------------------------------------------------- */

body.tt-shop-page .storefront-sorting {
    margin-bottom: 0 !important;
    padding: 0 !important;
}

body.tt-shop-page .woocommerce-ordering {
    margin-bottom: 20px;
}

body.tt-shop-page .woocommerce-ordering select {
    font-size: 14px;
    padding: 8px 36px 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

body.tt-shop-page .woocommerce-ordering select:focus {
    border-color: #d35400;
    outline: none;
}

body.tt-shop-page .woocommerce-result-count {
    font-size: 14px;
    color: #6b7280;
}

/* --------------------------------------------------------------------------
   PRODUCT GRID
   -------------------------------------------------------------------------- */

body.tt-shop-page ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

body.tt-shop-page ul.products::before,
body.tt-shop-page ul.products::after {
    display: none !important;
}

@media (max-width: 991px) {
    body.tt-shop-page ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 767px) {
    body.tt-shop-page ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
}

/* --------------------------------------------------------------------------
   PRODUCT CARDS
   -------------------------------------------------------------------------- */

body.tt-shop-page ul.products li.product {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
    text-align: left;
}

body.tt-shop-page ul.products li.product:hover {
    border-color: #d35400 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Product image */
body.tt-shop-page ul.products li.product a img,
body.tt-shop-page ul.products li.product > a > img {
    width: 100% !important;
    aspect-ratio: 1;
    object-fit: contain;
    padding: 16px;
    background: #fff;
    margin: 0 !important;
    border-radius: 0;
}

/* Product title */
body.tt-shop-page ul.products li.product .woocommerce-loop-product__title,
body.tt-shop-page ul.products li.product h2 {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1a202c !important;
    padding: 0 16px !important;
    margin: 12px 0 8px !important;
    line-height: 1.45 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

/* Category card title */
body.tt-shop-page ul.products li.product-category h2 {
    text-align: center;
    min-height: auto;
}

body.tt-shop-page ul.products li.product-category h2 .count {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    margin-top: 2px;
}

/* Star rating */
body.tt-shop-page ul.products li.product .star-rating {
    padding: 0 16px;
    margin: 0 0 6px;
    font-size: 12px;
}

/* Price */
body.tt-shop-page ul.products li.product .price {
    padding: 0 16px !important;
    margin: 0 0 12px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
}

body.tt-shop-page ul.products li.product .price del {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
    opacity: 1 !important;
}

body.tt-shop-page ul.products li.product .price ins {
    font-weight: 700 !important;
    text-decoration: none !important;
    color: #1a202c !important;
}

/* Sale badge */
body.tt-shop-page ul.products li.product .onsale {
    background: #2e7d32 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 3px 10px !important;
    text-transform: none !important;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    margin: 0 !important;
}

body.tt-shop-page ul.products li.product {
    position: relative;
}

/* Add to cart button */
body.tt-shop-page ul.products li.product .button,
body.tt-shop-page ul.products li.product a.add_to_cart_button,
body.tt-shop-page ul.products li.product a.product_type_simple {
    display: block !important;
    width: calc(100% - 32px) !important;
    margin: 0 16px 16px !important;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center;
    background: #d35400 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

body.tt-shop-page ul.products li.product .button:hover,
body.tt-shop-page ul.products li.product a.add_to_cart_button:hover {
    background: #b94700 !important;
}

/* "View products" link on category cards */
body.tt-shop-page ul.products li.product-category a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --------------------------------------------------------------------------
   PAGINATION
   -------------------------------------------------------------------------- */

body.tt-shop-page .woocommerce-pagination {
    margin-top: 40px !important;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

body.tt-shop-page .woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

body.tt-shop-page .woocommerce-pagination ul li {
    margin: 0;
}

body.tt-shop-page .woocommerce-pagination ul li a,
body.tt-shop-page .woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}

body.tt-shop-page .woocommerce-pagination ul li a:hover {
    background: #fff;
    border-color: #d35400;
    color: #d35400;
}

body.tt-shop-page .woocommerce-pagination ul li span.current {
    background: #d35400;
    border-color: #d35400;
    color: #fff;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   BREADCRUMB
   -------------------------------------------------------------------------- */

body.tt-shop-page .woocommerce-breadcrumb {
    font-size: 13px !important;
    color: #6b7280 !important;
    padding: 14px 0 0 !important;
    margin: 0 !important;
}

body.tt-shop-page .woocommerce-breadcrumb a {
    color: #374151;
    text-decoration: none;
}

body.tt-shop-page .woocommerce-breadcrumb a:hover {
    color: #d35400;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 575px) {
    .tt-shop-title {
        font-size: 22px !important;
    }
    .tt-shop-count {
        font-size: 16px;
    }
    body.tt-shop-page ul.products li.product .woocommerce-loop-product__title,
    body.tt-shop-page ul.products li.product h2 {
        font-size: 13px !important;
        padding: 0 12px !important;
    }
    body.tt-shop-page ul.products li.product .price {
        padding: 0 12px !important;
        font-size: 16px !important;
    }
    body.tt-shop-page ul.products li.product .button,
    body.tt-shop-page ul.products li.product a.add_to_cart_button {
        margin: 0 12px 12px !important;
        width: calc(100% - 24px) !important;
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
}
