/* =====================================================
   SoccerDeal Product Page CSS - 1:1 soccerdeal.cc
   No overlapping, clean layout, full responsive
   ===================================================== */

/* === CONTAINER === */
.sd-product-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 40px;
    background: #fff;
    font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
}

/* === PRODUCT LAYOUT === */
.sd-product-container {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}
.sd-product-container > * {
    min-width: 0;
    overflow: hidden;
}

/* === GALLERY === */
.sd-product-gallery {
    position: sticky;
    top: 20px;
    align-self: start;
}
.sd-gallery-main {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fafafa;
}
.sd-gallery-main img {
    width: 100%;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
}
.sd-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.sd-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s;
}
.sd-thumb.active { border-color: #ff5367; }
.sd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* === PRODUCT INFO === */
.sd-product-info {
    /* Normal flow, no absolute positioning */
}
.sd-product-title {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.3;
}
.sd-product-price {
    font-size: 24px;
    font-weight: 700;
    color: #ff5367;
    margin-bottom: 15px;
}
.sd-product-price del { color: #999; font-size: 16px; font-weight: 400; margin-right: 5px; }
.sd-product-price ins { text-decoration: none; }

/* Stock */
.sd-stock.in-stock { color: #2ada71; font-weight: 600; font-size: 14px; margin-bottom: 15px; }

/* === SIZE === */
.sd-size-section { margin-bottom: 15px; }
.sd-size-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sd-size-label { font-weight: 700; font-size: 14px; text-transform: uppercase; color: #333; }
.sd-size-guide { color: #ff5367; font-size: 13px; text-decoration: underline; }
.sd-size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.sd-size-btn {
    min-width: 44px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 8px;
}
.sd-size-btn:hover { border-color: #ff5367; color: #ff5367; }
.sd-size-btn.active { background: #ff5367; color: #fff; border-color: #ff5367; }

/* === CUSTOMIZE & PATCH === */
.sd-customize-section, .sd-patch-section {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}
.sd-customize-section h4, .sd-patch-section h4 {
    color: #ff5367;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 10px;
    text-transform: uppercase;
}
.sd-customize-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.sd-customize-row label { color: #666; min-width: 70px; font-size: 13px; font-weight: 600; }
.sd-customize-row input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 13px;
    color: #333;
    background: #fff;
}
.sd-custom-price { color: #ff5367; font-weight: 600; font-size: 13px; white-space: nowrap; }
.sd-patch-section select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    color: #333;
    background: #fff;
}

/* === TIER PRICING === */
.sd-tier-pricing {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}
.sd-tier-pricing h4 { color: #ff5367; font-size: 14px; font-weight: 700; margin: 0 0 10px; text-transform: uppercase; }
.sd-tier-pricing table { width: 100%; border-collapse: collapse; }
.sd-tier-pricing th { color: #333; padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; font-size: 13px; font-weight: 700; }
.sd-tier-pricing td { color: #666; padding: 8px 10px; border-bottom: 1px solid #eee; font-size: 13px; }

/* === ADD TO CART === */
.sd-add-to-cart-wrap {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}
.sd-quantity {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.sd-qty-btn {
    width: 36px;
    height: 44px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    line-height: 44px;
    text-align: center;
    padding: 0;
}
.sd-quantity input {
    width: 50px;
    height: 44px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    background: #fff;
    padding: 0;
}
.sd-add-to-cart-btn {
    flex: 1;
    height: 44px;
    background: #ff5367;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.5px;
}
.sd-add-to-cart-btn:hover { background: #e63950; }
.sd-buy-now-btn {
    height: 44px;
    padding: 0 24px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.sd-buy-now-btn:hover { background: #555; }

/* === TRUST BADGES === */
.sd-trust-badges {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.sd-trust-item { color: #666; font-size: 13px; }

/* === PRODUCT META === */
.sd-product-meta { color: #999; font-size: 13px; padding-top: 10px; border-top: 1px solid #eee; }
.sd-product-meta span { display: block; margin-bottom: 4px; }

/* === TABS === */
.sd-product-tabs { margin-bottom: 40px; }
.sd-tabs-nav {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
    gap: 0;
    overflow-x: auto;
}
.sd-tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #999;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.sd-tab-btn:hover { color: #333; }
.sd-tab-btn.active { color: #333; border-bottom-color: #ff5367; }
.sd-tab-content { display: none; }
.sd-tab-content.active { display: block; }
.sd-description { color: #333; line-height: 1.7; font-size: 14px; }
.sd-description h3 { color: #333; font-size: 16px; margin: 15px 0 8px; }
.sd-description ul { padding-left: 20px; margin: 8px 0; }
.sd-description li { margin-bottom: 4px; }

/* Specs Table */
.sd-specs-table { width: 100%; border-collapse: collapse; }
.sd-specs-table th { background: #f5f5f5; color: #333; padding: 12px 15px; text-align: left; border: 1px solid #eee; width: 30%; font-weight: 700; }
.sd-specs-table td { color: #666; padding: 12px 15px; border: 1px solid #eee; }

/* Shipping */
.sd-shipping-info { color: #333; line-height: 1.7; }
.sd-shipping-info ul { padding-left: 20px; margin: 8px 0; }

/* Reviews */
.sd-reviews-placeholder { text-align: center; padding: 40px 20px; color: #999; }

/* === RELATED PRODUCTS === */
.sd-related-products { margin-bottom: 40px; }
.sd-related-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #ff5367;
    padding-bottom: 8px;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.sd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.sd-related-item {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    background: #fff;
}
.sd-related-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.sd-related-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.sd-related-item h3 {
    font-size: 13px;
    color: #333;
    padding: 8px 10px 0;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}
.sd-related-item .price { color: #ff5367; font-weight: 700; font-size: 14px; padding: 4px 10px 8px; display: block; }

/* =====================================================
   RESPONSIVE - TABLET
   ===================================================== */
@media (max-width: 1024px) {
    .sd-related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */
@media (max-width: 768px) {
    .sd-product-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sd-product-gallery { position: static; }
    .sd-product-title { font-size: 18px; }
    .sd-product-price { font-size: 20px; }
    .sd-related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .sd-tab-btn { padding: 10px 14px; font-size: 12px; }
    .sd-trust-badges { grid-template-columns: 1fr; }
    .sd-add-to-cart-wrap { flex-wrap: wrap; }
    .sd-buy-now-btn { flex: 1; }
    .sd-trust-item { font-size: 12px; }
    .sd-customize-row { flex-direction: column; align-items: flex-start; gap: 5px; }
    .sd-customize-row label { min-width: auto; }
    .sd-customize-row input { width: 100%; }
}

/* =====================================================
   RESPONSIVE - SMALL MOBILE
   ===================================================== */
@media (max-width: 480px) {
    .sd-product-page { padding: 10px 10px 30px; }
    .sd-product-title { font-size: 16px; }
    .sd-size-btn { min-width: 38px; height: 36px; font-size: 12px; }
    .sd-add-to-cart-btn { font-size: 13px; }
    .sd-related-grid { gap: 8px; }
    .sd-related-item h3 { font-size: 11px; }
    .sd-related-item .price { font-size: 12px; }
}

/* Touch optimization */
@media (hover: none) {
    .sd-add-to-cart-btn, .sd-buy-now-btn, .sd-size-btn, .sd-qty-btn { min-height: 44px; }
}
/* Hide duplicate product page - nth-of-type approach */
.sd-product-page { display: block; }
.sd-product-page ~ .sd-product-page,
.sd-product-page + script + .sd-product-page,
.sd-product-page:nth-of-type(n+2) { display: none !important; }
.sd-product-container ~ .sd-product-container { display: none !important; }