/*
Theme Name: Minimal WooCommerce Theme
Theme URI: https://example.com
Description: A clean, minimal WooCommerce theme with centered layout and no add-to-cart buttons
Version: 1.0.0
Author: Custom
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: minimal-woocommerce
Tags: woocommerce, e-commerce, minimal, clean
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #ebedf0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Global page wrapper */
.site-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: #ebedf0;
    min-height: 100vh;
}

/* Homepage content container */
.site-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

/* Header */
.site-header {
    background-color: #323232;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-title {
    font-size: 20px;
    font-weight: 400;
    color: #f4e1a0;
    text-decoration: none;
    font-family: 'Josefin Sans', sans-serif;
}

/* Main Content */
.site-main {
    padding: 12px 0;
    min-height: calc(100vh - 200px);
}

/* Footer */
.site-footer {
    padding: 15px 0;
    text-align: center;
    font-size: 12px;
    color: #666;
    background-color: #ebedf0;
}

/* Search Bar */
.search-bar {
    background-color: #eaedf0;
    padding: 8px 16px;
    position: sticky;
    top: 48px;
    z-index: 99;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 8px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Product Card */
.product-item {
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
}

.product-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    width: 100%;
    height: auto;
    min-height: 150px;
    object-fit: cover;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    display: block;
}

.product-content {
    padding: 8px;
}

.hot-badge {
    display: inline-block;
    background-color: #fa2653;
    color: #fff;
    padding: 1px 3px;
    font-size: 12px;
    transform: scale(0.8);
    transform-origin: left;
    margin-right: -6px;
}

.product-title {
    font-size: 14px;
    font-weight: 400;
    color: #795548;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
}

.product-price {
    font-size: 16px;
    font-weight: 400;
    color: #fa2653;
    margin-bottom: 4px;
}

.product-currency {
    color: #969799;
    font-size: 12px;
    font-weight: 100;
    transform: scale(0.8);
    display: inline-block;
    margin-left: 4px;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.product-rating-stars {
    color: #ffd21e;
    font-size: 14px;
}

.product-rating-count {
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

/* Single product page — layout handled by sp-* classes */

/* Image Upload Section */
.image-upload-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.image-upload-section h3 {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}

.upload-form {
    max-width: 100%;
    margin: 0 auto;
}

.upload-field {
    margin-bottom: 16px;
}

.upload-field label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin-bottom: 8px;
}

.upload-field input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fafafa;
}

.upload-button {
    display: inline-block;
    padding: 10px 24px;
    background-color: #323232;
    color: #f4e1a0;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Josefin Sans', sans-serif;
}

.upload-button:hover {
    background-color: #444;
}

.uploaded-images {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.uploaded-image-item {
    position: relative;
}

.uploaded-image-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide WooCommerce elements */
.woocommerce-breadcrumb,
.woocommerce-result-count,
.woocommerce-ordering,
.woocommerce-pagination,
.add-to-cart-button,
.quantity,
.variations_form,
.single_add_to_cart_button,
.woocommerce-product-gallery__wrapper,
.woocommerce-tabs,
.related.products,
.up-sells,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    display: none !important;
}

/* Section Title */
.section-title {
    margin: 12px;
    font-size: 16px;
    color: #fa2653;
    text-align: center;
    font-weight: 400;
}

/* ================================================
   Header back button / product page header
   ================================================ */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-inner {
    width: 100%;
    text-align: center;
}

.header-back-btn {
    color: #f4e1a0;
    font-size: 20px;
    text-decoration: none;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    text-align: center;
}

.header-right-spacer {
    width: 40px;
    flex-shrink: 0;
}

/* ================================================
   Single Product Page — new design
   ================================================ */

/* Image swiper */
.sp-swiper-wrap {
    position: relative;
    background: #000;
    width: 100%;
}

.sp-swiper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.sp-swiper-slide {
    display: none;
    width: 100%;
}

.sp-swiper-slide.active {
    display: block;
}

.sp-slide-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.sp-no-image {
    height: 250px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    background: #f5f5f5;
}

.sp-swiper-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    background: #fff;
}

.sp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: background 0.2s;
}

.sp-dot.active {
    background: #fa2653;
}

/* Price block */
.sp-price-block {
    background: #fff;
    padding: 14px 16px 10px;
}

.sp-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.sp-price {
    font-size: 28px;
    font-weight: 600;
    color: #ee0a24;
    line-height: 1;
}

.sp-price .woocommerce-Price-amount {
    font-size: 28px;
    font-weight: 600;
    color: #ee0a24;
}

.sp-currency {
    font-size: 13px;
    color: #969799;
    font-weight: 300;
}

/* Divider */
.sp-divider {
    width: 100%;
    height: 6px;
    background-color: #ebedf0;
}

/* Info block — title + short description */
.sp-info-block {
    background: #fff;
    padding: 16px;
}

.sp-title {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
    word-break: break-word;
}

.sp-description {
    font-size: 15px;
    line-height: 1.563;
    color: #565656;
    font-family: Helvetica, 'Helvetica Neue', Arial, sans-serif;
}

.sp-description p {
    margin: 0 0 12px;
}

/* Full content */
.sp-content {
    background: #fff;
    padding: 0 16px 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #565656;
    overflow-wrap: break-word;
}

.sp-content img {
    max-width: 100%;
    height: auto;
}

/* Upload section */
.sp-upload-section {
    background: #fff;
    padding: 20px 16px;
}

.sp-upload-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 14px;
    text-align: center;
}

.sp-upload-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed #ddd;
    border-radius: 6px;
    padding: 14px 12px;
    cursor: pointer;
    background: #fafafa;
}

.sp-file-icon {
    font-size: 22px;
}

.sp-file-text {
    font-size: 14px;
    color: #666;
}

.sp-file-input {
    display: none;
}

.sp-upload-btn {
    width: 100%;
    padding: 12px;
    background-color: #323232;
    color: #f4e1a0;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Josefin Sans', sans-serif;
    font-style: italic;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s;
}

.sp-upload-btn:hover {
    background-color: #444;
}

.uploaded-images {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.uploaded-image-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .sp-title {
        font-size: 16px;
    }

    .sp-price,
    .sp-price .woocommerce-Price-amount {
        font-size: 24px;
    }

    .product-title {
        font-size: 13px;
    }
}
