/**
 * WooCommerce Product Display Pro - Frontend Styles
 * Version: 5.0.0
 * Color Scheme: Gold (#DCA54A) + White
 * Design: No border radius, fully responsive
 */

/* ===================================
   CSS VARIABLES & ROOT STYLES
=================================== */
:root {
    --wpd-primary-color: #D09A40;
    --wpd-white: #FFFFFF;
    --wpd-black: #000000;
    --wpd-text-dark: #333333;
    --wpd-text-light: #666666;
    --wpd-border: #D09A40;
    --wpd-bg-light: #F8F8F8;
    --wpd-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --wpd-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --wpd-transition: all 0.3s ease;
}

/* ===================================
   RESET & BASE STYLES
=================================== */
.wpd-product-card,
.wpd-product-card * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.wpd-product-card {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--wpd-text-dark);
}

/* ===================================
   MAIN CARD CONTAINER
=================================== */
.wpd-product-card {
    background: var(--wpd-white);
    border: 3px solid var(--wpd-border);
    padding: 20px;
    margin: 20px auto;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--wpd-shadow);
    transition: var(--wpd-transition);
    position: relative;
    overflow: hidden;
}

.wpd-product-card:hover {
    box-shadow: var(--wpd-shadow-hover);
    border-color: #C08830;
}

/* ===================================
   IMAGE SECTION
=================================== */
.wpd-image-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
    background: var(--wpd-bg-light);
    margin-bottom: 15px;
    order: 0;
}

.wpd-image-wrap img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--wpd-transition);
}

.wpd-image-wrap:hover img {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Image zoom effect */
.wpd-image-wrap.wpd-zoom-enabled {
    cursor: zoom-in;
}

.wpd-image-wrap.wpd-zoom-enabled:hover img {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ===================================
   BADGES
=================================== */
.wpd-badge {
    position: absolute;
    top: 15px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    background: var(--wpd-black);
    color: var(--wpd-white);
}

.wpd-badge-sale {
    left: 15px;
    background: #E74C3C;
}

.wpd-box-badge {
    right: 15px;
    background: var(--wpd-primary-color);
    color: var(--wpd-white);
}

/* ===================================
   DETAILS SECTION
=================================== */
.wpd-details {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--wpd-white);
    align-items: center;
    order: 1;
}

/* Title */
.wpd-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wpd-text-dark);
    margin: 0 0 15px 0;
    line-height: 1.4;
    text-align: center;
    order: -1;
    width: 100%;
}

/* Description */
.wpd-desc {
    font-size: 15px;
    color: var(--wpd-text-light);
    line-height: 1.7;
}

/* Categories */
.wpd-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wpd-cat {
    display: inline-block;
    padding: 4px 12px;
    background: #FFFAF0;
    color: var(--wpd-text-dark);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--wpd-border);
}

/* Tags */
.wpd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wpd-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--wpd-primary-color);
    color: var(--wpd-white);
    font-size: 12px;
    font-weight: 500;
}

/* Rating */
.wpd-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpd-rating .star-rating {
    color: var(--wpd-primary-color) !important;
}

.wpd-rating-count {
    font-size: 14px;
    color: var(--wpd-text-light);
}

/* SKU */
.wpd-sku {
    font-size: 13px;
    color: var(--wpd-text-light);
    font-family: monospace;
}

/* Price */
.wpd-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--wpd-text-dark);
    margin: 10px 0 15px 0;
    text-align: center;
}

.wpd-price del {
    font-size: 16px;
    color: var(--wpd-text-light);
    margin-right: 8px;
}

.wpd-price ins {
    text-decoration: none;
    color: var(--wpd-text-dark);
}

/* Stock */
.wpd-stock {
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    display: inline-block;
    background: var(--wpd-bg-light);
}

.wpd-stock.in-stock {
    color: #27AE60;
    background: #E8F8F0;
}

.wpd-stock.out-of-stock {
    color: #E74C3C;
    background: #FDEDEC;
}

/* ===================================
   VARIATIONS
=================================== */
.wpd-variations {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
}

.wpd-var-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.wpd-var-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--wpd-text-dark);
    text-align: center;
}

.wpd-select {
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--wpd-white);
    background: var(--wpd-text-dark);
    border: 2px solid var(--wpd-text-dark);
    outline: none;
    cursor: pointer;
    transition: var(--wpd-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
    font-weight: 400;
    text-align: center;
}

.wpd-select:hover,
.wpd-select:focus {
    border-color: var(--wpd-primary-color);
    background-color: var(--wpd-text-dark);
}

.wpd-reset {
    font-size: 13px;
    color: var(--wpd-primary-color);
    text-decoration: none;
    align-self: flex-start;
    font-weight: 600;
    transition: var(--wpd-transition);
}

.wpd-reset:hover {
    color: var(--wpd-text-dark);
}

/* ===================================
   ACTIONS (Quantity + Button)
=================================== */
.wpd-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Quantity Selector */
.wpd-qty {
    display: flex;
    align-items: center;
    background: var(--wpd-white);
    border: none;
}

.wpd-qty-btn {
    width: 45px;
    height: 45px;
    background: var(--wpd-text-dark);
    border: none;
    color: var(--wpd-white);
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--wpd-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wpd-qty-btn:hover {
    background: var(--wpd-primary-color);
    color: var(--wpd-white);
}

.wpd-qty-btn:active {
    transform: scale(0.95);
}

.wpd-qty-num {
    width: 70px;
    height: 45px;
    border: 2px solid var(--wpd-border);
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--wpd-text-dark);
    outline: none;
    -moz-appearance: textfield;
    background: var(--wpd-white);
}

.wpd-qty-num::-webkit-inner-spin-button,
.wpd-qty-num::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.wpd-btn {
    flex: 1;
    min-width: 150px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--wpd-transition);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}

.wpd-btn-primary {
    background: var(--wpd-primary-color);
    color: var(--wpd-white);
    border: none;
}

.wpd-btn-primary:hover {
    background: #C08830;
    border-color: #C08830;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(208, 154, 64, 0.4);
}

.wpd-btn-primary:active {
    transform: translateY(0);
}

.wpd-btn-primary:disabled,
.wpd-btn-disabled {
    background: #CCCCCC;
    color: #999999;
    cursor: not-allowed;
    transform: none;
    border: none;
}

.wpd-btn-primary:disabled:hover,
.wpd-btn-disabled:hover {
    background: #CCCCCC;
    transform: none;
    box-shadow: none;
}

/* Loading state */
.wpd-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.wpd-btn.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid var(--wpd-white);
    border-top-color: transparent;
    animation: wpd-spin 0.6s linear infinite;
}

@keyframes wpd-spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   MESSAGES
=================================== */
.wpd-msg {
    margin-top: 15px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.wpd-msg.success {
    background: #E8F8F0;
    color: #27AE60;
    border-left: 4px solid #27AE60;
    display: block;
}

.wpd-msg.error {
    background: #FDEDEC;
    color: #E74C3C;
    border-left: 4px solid #E74C3C;
    display: block;
}

/* ===================================
   BOX MODE (GOLD MODE)
=================================== */
.wpd-box-mode {
    border: 3px solid var(--wpd-primary-color);
    position: relative;
    background: var(--wpd-white);
}

.wpd-box-mode::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, transparent 0%, var(--wpd-primary-color) 50%, transparent 100%);
}

.wpd-box-mode::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, transparent 0%, var(--wpd-primary-color) 50%, transparent 100%);
}

.wpd-box-mode .wpd-title {
    color: var(--wpd-text-dark);
    font-size: 20px;
    font-weight: 600;
}

.wpd-box-mode .wpd-price {
    color: var(--wpd-text-dark);
    font-size: 18px;
}

.wpd-box-mode .wpd-btn-primary {
    background: var(--wpd-primary-color);
    border: none;
    box-shadow: 0 4px 12px rgba(208, 154, 64, 0.3);
}

.wpd-box-mode .wpd-btn-primary:hover {
    background: #C08830;
    border-color: #C08830;
    box-shadow: 0 6px 16px rgba(208, 154, 64, 0.5);
}

.wpd-box-mode .wpd-qty-num {
    border-color: var(--wpd-primary-color);
}

.wpd-box-mode .wpd-select {
    border-color: var(--wpd-text-dark);
}

.wpd-box-mode .wpd-select:hover,
.wpd-box-mode .wpd-select:focus {
    background-color: var(--wpd-text-dark);
    border-color: var(--wpd-primary-color);
}

/* ===================================
   LAYOUT VARIATIONS
=================================== */

/* COMPACT LAYOUT */
.wpd-layout-compact {
    max-width: 350px;
}

.wpd-layout-compact .wpd-image-wrap {
    padding-bottom: 100%;
}

.wpd-layout-compact .wpd-details {
    padding: 20px;
    gap: 10px;
}

.wpd-layout-compact .wpd-title {
    font-size: 20px;
}

.wpd-layout-compact .wpd-price {
    font-size: 24px;
}

.wpd-layout-compact .wpd-btn {
    min-width: auto;
    width: 100%;
}

/* WIDE LAYOUT (Horizontal) */
.wpd-layout-wide {
    flex-direction: row;
    max-width: 100%;
}

.wpd-layout-wide .wpd-image-wrap {
    width: 50%;
    padding-bottom: 0;
    min-height: 400px;
}

.wpd-layout-wide .wpd-image-wrap img {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wpd-layout-wide .wpd-details {
    width: 50%;
    padding: 40px;
}

/* MINIMAL LAYOUT */
.wpd-layout-minimal .wpd-details {
    padding: 30px;
    gap: 20px;
}

.wpd-layout-minimal .wpd-title {
    font-size: 26px;
    font-weight: 600;
}

.wpd-layout-minimal .wpd-desc {
    font-size: 16px;
}

.wpd-layout-minimal .wpd-price {
    font-size: 30px;
}

/* ===================================
   RESPONSIVE DESIGN
=================================== */

/* Tablets (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .wpd-product-card {
        margin: 15px auto;
    }
    
    .wpd-layout-wide {
        flex-direction: column;
    }
    
    .wpd-layout-wide .wpd-image-wrap,
    .wpd-layout-wide .wpd-details {
        width: 100%;
    }
    
    .wpd-layout-wide .wpd-image-wrap {
        padding-bottom: 75%;
        min-height: auto;
    }
    
    .wpd-layout-wide .wpd-details {
        padding: 30px;
    }
}

/* Mobile Landscape (576px - 767px) */
@media screen and (max-width: 767px) {
    .wpd-details {
        padding: 20px;
        gap: 12px;
    }
    
    .wpd-title {
        font-size: 20px;
    }
    
    .wpd-desc {
        font-size: 14px;
    }
    
    .wpd-price {
        font-size: 24px;
    }
    
    .wpd-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .wpd-qty {
        width: 100%;
        justify-content: center;
    }
    
    .wpd-btn {
        min-width: 100%;
        width: 100%;
    }
    
    .wpd-box-mode .wpd-title {
        font-size: 22px;
    }
    
    .wpd-box-mode .wpd-price {
        font-size: 26px;
    }
}

/* Mobile Portrait (0 - 575px) */
@media screen and (max-width: 575px) {
    .wpd-product-card {
        margin: 10px auto;
        border-width: 2px;
        padding: 15px;
    }
    
    .wpd-image-wrap {
        padding-bottom: 75%;
        margin-bottom: 12px;
    }
    
    .wpd-details {
        padding: 0;
        gap: 10px;
    }
    
    .wpd-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .wpd-desc {
        font-size: 13px;
    }
    
    .wpd-price {
        font-size: 16px;
        margin: 8px 0 12px 0;
    }
    
    .wpd-badge {
        top: 10px;
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .wpd-badge-sale {
        left: 10px;
    }
    
    .wpd-box-badge {
        right: 10px;
    }
    
    .wpd-select {
        padding: 10px 14px;
        font-size: 13px;
        max-width: 100%;
    }
    
    .wpd-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .wpd-qty-num {
        width: 60px;
        height: 40px;
        font-size: 15px;
    }
    
    .wpd-btn {
        padding: 12px 20px;
        font-size: 13px;
        min-width: 120px;
    }
    
    .wpd-layout-compact {
        max-width: 100%;
    }
    
    .wpd-variations {
        max-width: 100%;
    }
}

/* Extra Small Devices (320px - 479px) */
@media screen and (max-width: 479px) {
    .wpd-details {
        padding: 12px;
    }
    
    .wpd-title {
        font-size: 16px;
    }
    
    .wpd-price {
        font-size: 20px;
    }
    
    .wpd-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* ===================================
   NO BORDER RADIUS ENFORCEMENT
=================================== */
.wpd-product-card,
.wpd-product-card *,
.wpd-badge,
.wpd-cat,
.wpd-tag,
.wpd-select,
.wpd-qty,
.wpd-qty-btn,
.wpd-qty-num,
.wpd-btn,
.wpd-msg {
    border-radius: 0 !important;
}

/* ===================================
   ACCESSIBILITY
=================================== */
.wpd-btn:focus,
.wpd-select:focus,
.wpd-qty-num:focus,
.wpd-qty-btn:focus {
    outline: 3px solid var(--wpd-primary-color);
    outline-offset: 2px;
}

.wpd-btn:focus:not(:focus-visible),
.wpd-select:focus:not(:focus-visible),
.wpd-qty-num:focus:not(:focus-visible),
.wpd-qty-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ===================================
   PRINT STYLES
=================================== */
@media print {
    .wpd-product-card {
        box-shadow: none;
        border: 1px solid var(--wpd-border);
    }
    
    .wpd-btn,
    .wpd-qty {
        display: none;
    }
}

/* ===================================
   FORCE LIGHT MODE - NO DARK MODE
=================================== */
@media (prefers-color-scheme: dark) {
    .wpd-product-card {
        background: var(--wpd-white) !important;
        border-color: var(--wpd-border) !important;
        color: var(--wpd-text-dark) !important;
    }
    
    .wpd-details {
        background: var(--wpd-white) !important;
    }
    
    .wpd-title,
    .wpd-var-label {
        color: var(--wpd-text-dark) !important;
    }
    
    .wpd-desc {
        color: var(--wpd-text-light) !important;
    }
    
    .wpd-select,
    .wpd-qty-num,
    .wpd-qty-btn {
        background: var(--wpd-white) !important;
        border-color: var(--wpd-border) !important;
        color: var(--wpd-text-dark) !important;
    }
    
    .wpd-cat {
        background: var(--wpd-bg-light) !important;
        color: var(--wpd-text-dark) !important;
    }
}
