/* Product Page Styles */
.hq-product-page {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 150px;
    /* Increased space for bottom nav + sticky bar */
    padding-top: 0;
    position: relative;
    z-index: 999;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* Header Rows */
.hq-header-row {
    background: white;
    padding: 12px 15px;
    position: relative;
    /* Changed from sticky to relative to prevent overlap */
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
}

.hq-title-row {
    background: white;
    padding: 8px 15px 12px 15px;
}

.hq-back-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #000;
}

.hq-back-btn .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #000;
}

.hq-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    color: #000;
    white-space: normal;
    /* Ensure it wraps */
    overflow: visible;
}

/* Product Gallery */
.hq-product-gallery {
    background: white;
    margin-bottom: 8px;
    padding-bottom: 15px;
}

.hq-main-image {
    position: relative;
    background: white;
    padding: 0;
    /* Remove padding for full width */
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
    /* Allow image to define height */
    border: none;
    /* Remove border */
    border-radius: 0;
}

.hq-main-image img {
    width: 100%;
    /* Force full width */
    height: auto;
    max-height: none;
    /* remove max height constraint */
    object-fit: contain;
    display: block;
}

.hq-discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ffc107;
    color: #000;
    padding: 6px 10px;
    /* Bigger padding */
    border-radius: 4px;
    font-size: 15px;
    /* Bigger font */
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hq-wishlist-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: 1px solid #eee;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.hq-wishlist-overlay .dashicons {
    color: #666;
    font-size: 20px;
}

.hq-thumbnail-row {
    padding: 0 15px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.hq-thumbnail-row::-webkit-scrollbar {
    display: none;
}

.hq-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.hq-thumbnail.active {
    border-color: var(--hq-primary);
}

.hq-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Content */
.hq-product-content {
    background: white;
    padding: 15px;
    margin-top: 0;
    /* Ensure no gap */
}

/* Pricing */
.hq-pricing-section {
    margin-bottom: 15px;
}

.hq-regular-price {
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
    margin-right: 8px;
}

.hq-sale-price {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    margin-right: 8px;
}

.hq-tax-text {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 4px;
}

/* Delivery Info */
.hq-delivery-info {
    margin-bottom: 15px;
}

.hq-delivery-badge,
.hq-store-badge {
    font-size: 12px;
    color: #e67e22;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hq-store-badge {
    color: #666;
}

/* Product Actions */
.hq-product-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
}

/* Price & Action Row */
.hq-price-action-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    gap: 10px;
}

.hq-price-group {
    flex: 1;
}

.hq-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.hq-discount-tag {
    background: #ffc107;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.hq-regular-price-small {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.hq-final-price-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.hq-sale-price-large {
    font-size: 20px;
    font-weight: 700;
    color: #000;
}

.hq-tax-text-inline {
    font-size: 12px;
    color: #666;
}

.hq-action-group {
    flex-shrink: 0;
}

/* Initial Add to Cart Button */
.hq-smart-add-btn {
    display: flex;
    width: 100%;
}

.hq-add-main-btn {
    background: #ffc107;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    transition: background 0.2s;
}

.hq-add-main-btn:hover {
    background: #ffb300;
}

.hq-add-main-btn.full-width {
    width: 100%;
    flex: 1;
}

/* Transformed Quantity Selector Styles */
.hq-transform-qty-selector {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #fff !important;
    border: 1.5px solid #ffc107 !important;
    border-radius: 8px !important;
    height: 44px !important;
    overflow: hidden !important;
}

.hq-transform-minus,
.hq-transform-plus {
    width: 32% !important;
    height: 100% !important;
    border: none !important;
    font-size: 20px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.hq-transform-minus {
    background: #fff8e1 !important;
    color: #000 !important;
}

.hq-transform-minus:active {
    background: #ffecb3 !important;
}

.hq-transform-plus {
    background: #ffc107 !important;
    color: #000 !important;
}

.hq-transform-plus:active {
    background: #ffb300 !important;
}

.hq-transform-val {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #000 !important;
}

/* Expandable Sections */
.hq-expandable-section {
    border-top: 1px solid #eee;
    padding: 15px 0;
}

.hq-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.hq-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.hq-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.hq-section-header.expanded .hq-toggle-icon {
    transform: rotate(180deg);
}

.hq-section-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-top: 12px;
}

.hq-section-content.collapsed {
    max-height: 0;
    padding-top: 0;
}

.hq-highlight-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.hq-check {
    color: #4caf50;
    font-weight: 700;
    flex-shrink: 0;
}

/* Reviews Section */
.hq-reviews-section {
    padding: 15px 0;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.hq-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hq-stars {
    color: #ffc107;
    font-size: 18px;
    letter-spacing: 2px;
}

.hq-rating-text {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.hq-wishlist-btn-large {
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hq-add-to-cart-secondary {
    background: var(--hq-accent);
    color: var(--hq-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
}

/* Sticky Bottom Bar */
.hq-sticky-bottom-bar {
    position: fixed;
    bottom: 60px;
    /* Above bottom nav */
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #eee;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2147483647;
    /* Maximum Z-Index to stay on top of footer */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    height: auto;
    /* Allow growth */
    min-height: 70px;
}

.hq-bottom-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hq-bottom-price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
}

.hq-bottom-title {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
    white-space: nowrap;
    /* Revert to nowrap */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: normal;
}

.hq-bottom-add-cart {
    background: var(--hq-accent);
    color: var(--hq-primary);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    white-space: nowrap;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}