/* Dearshop WooCommerce Single Product CSS */

/* ============================
   Product Summary Layout
   ============================ */
.dearshop-product-summary {
    color: #333;
}

/* 1. Rank Badge */
.dearshop-rank-badge {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 0.5rem;
}

/* 2. Product Title */
.dearshop-product-title {
    font-size: 1.8rem !important;
    font-weight: 400 !important;
    color: #222 !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
}

/* 3. Equipment Info */
.dearshop-equipment-info {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* 4. Price */
.dearshop-price {
    font-size: 1.5rem;
    color: #c5753a;
    margin-bottom: 2rem;
    font-weight: 400;
}
.dearshop-price .woocommerce-Price-amount {
    color: #c5753a;
    font-weight: 400;
}
.dearshop-price del {
    color: #999;
    font-size: 1rem;
}
.dearshop-price ins {
    text-decoration: none;
}

/* 5. Action Buttons */
.dearshop-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.dearshop-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 1rem;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-line {
    background-color: #06C755;
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.3);
}

.btn-line:hover {
    background-color: #05b34c;
    color: #fff !important;
    box-shadow: 0 6px 15px rgba(6, 199, 85, 0.4);
    transform: translateY(-2px);
}

.btn-contact {
    background-color: #fff;
    color: #2c3038 !important;
    border: 1px solid #2c3038;
}

.btn-contact:hover {
    background-color: #f5f5f5;
}

/* 6. Condition Box */
.dearshop-condition-box {
    border-top: 1px solid #eae5de;
    border-bottom: 1px solid #eae5de;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.open-condition-modal {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    color: #333 !important;
    gap: 0.5rem;
}

.open-condition-modal .rank-text {
    font-size: 0.95rem;
    font-weight: 400;
    color: #333;
}

.open-condition-modal .condition-link {
    text-decoration: underline;
    color: #999;
    font-size: 0.95rem;
    margin-left: 0.5rem;
}

/* 7. Attributes Table */
.dearshop-attributes-table {
    margin-bottom: 2rem;
}

.dearshop-attributes-table table {
    width: 100%;
    border-collapse: collapse;
    border: none !important;
    background: transparent !important;
}

.dearshop-attributes-table th,
.dearshop-attributes-table td {
    padding: 0.6rem 0 !important;
    border: none !important;
    border-bottom: none !important;
    vertical-align: top;
    background: transparent !important;
}

.dearshop-attributes-table th {
    text-align: left;
    font-weight: 600;
    width: 35%;
    color: #333;
    font-size: 0.9rem;
}

.dearshop-attributes-table td {
    color: #666;
    font-size: 0.9rem;
}

/* 8. Share */
.dearshop-share {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eae5de;
    padding-bottom: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.dearshop-share > span {
    font-size: 0.9rem;
    font-weight: normal;
    color: #999;
}

.share-icons {
    display: flex;
    gap: 0.5rem;
}

.share-icons a {
    color: #999 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
}

.share-icons a:hover {
    color: #333 !important;
}

/* 9. Shopping Policy */
.dearshop-shopping-policy {
    padding-bottom: 2rem;
}

.policy-title {
    font-weight: 700 !important;
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
    color: #333 !important;
}

.policy-content {
    font-size: 0.85rem;
    line-height: 1.8;
    color: #666;
}

.policy-content p {
    margin-bottom: 0.5rem;
}

.policy-content ol {
    padding-left: 1rem;
    color: #666;
}

.policy-content li {
    margin-bottom: 0.5rem;
}

/* ============================
   Modal Styles
   ============================ */
.dearshop-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.dearshop-modal-content {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: dearshop-animatetop 0.3s;
}

@keyframes dearshop-animatetop {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.dearshop-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eae5de;
}

.dearshop-modal-header h2 {
    margin: 0 !important;
    font-weight: 500;
    font-size: 1.3rem;
}

.dearshop-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.dearshop-modal-close:hover {
    color: #000;
}

.dearshop-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.dearshop-modal-body h4 {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1.1rem;
}

.dearshop-modal-body p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ============================
   Responsive - Tablet (max 1024px)
   ============================ */
@media (max-width: 1024px) {
    .single-product div.product {
        padding: 0 20px !important;
    }
    
    .dearshop-product-title {
        font-size: 1.5rem !important;
    }
    .dearshop-actions a {
        padding: 0.8rem;
        font-size: 0.8rem;
    }
}

/* ============================
   Responsive - Mobile (max 768px)
   ============================ */
@media (max-width: 768px) {
    .single-product div.product {
        padding: 0 15px !important;
    }

    /* Stack product layout vertically on mobile */
    .single-product div.product .woocommerce-product-gallery,
    .single-product div.product .summary {
        width: 100% !important;
        float: none !important;
    }

    .dearshop-product-title {
        font-size: 1.4rem !important;
    }

    .dearshop-actions {
        flex-direction: column;
    }

    .dearshop-actions a {
        padding: 0.9rem;
        font-size: 0.85rem;
    }

    .dearshop-attributes-table th {
        width: 40%;
    }

    .dearshop-price {
        font-size: 1.3rem;
    }

    .dearshop-modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* ============================
   Responsive - Small Mobile (max 480px)
   ============================ */
@media (max-width: 480px) {
    .dearshop-product-title {
        font-size: 1.2rem !important;
    }

    .dearshop-rank-badge {
        font-size: 0.8rem;
    }

    .dearshop-equipment-info {
        font-size: 0.8rem;
    }

    .dearshop-attributes-table th,
    .dearshop-attributes-table td {
        font-size: 0.85rem !important;
    }
}

/* ============================
   Custom Search Page Grid
   ============================ */
.dearshop-custom-search-page {
    padding-top: 50px;
    padding-bottom: 80px;
}

.dearshop-custom-search-page .section-title {
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: #3e3328;
    font-weight: 400;
}

.dearshop-custom-search-page .product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.dearshop-custom-search-page .product-card {
    background: #fff;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eae5de;
}

.dearshop-custom-search-page .product-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.dearshop-custom-search-page .product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.dearshop-custom-search-page .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.dearshop-custom-search-page .product-card:hover .product-image img {
    transform: scale(1.05);
}

.dearshop-custom-search-page .product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.dearshop-custom-search-page .product-category {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.dearshop-custom-search-page .product-category a {
    color: #666;
    text-decoration: none;
}

.dearshop-custom-search-page .product-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    color: #3e3328;
    font-weight: 400;
}

.dearshop-custom-search-page .product-price {
    font-weight: 700;
    color: #c5a059;
    font-size: 1.2rem;
    margin-bottom: 0;
}

/* Pagination Overrides */
.dearshop-custom-search-page .dearshop-pagination {
    margin-top: 4rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dearshop-custom-search-page .dearshop-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border: 1px solid #eae5de !important;
    background-color: #fff !important;
    color: #3e3328 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 !important;
}

.dearshop-custom-search-page .dearshop-pagination .page-numbers:hover,
.dearshop-custom-search-page .dearshop-pagination .page-numbers.current {
    background-color: #c5a059 !important;
    color: #fff !important;
    border-color: #c5a059 !important;
}

/* Search Page Responsive */
@media (max-width: 1024px) {
    .dearshop-custom-search-page .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .dearshop-custom-search-page {
        padding-top: 30px;
        padding-bottom: 50px;
    }
    .dearshop-custom-search-page .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    .dearshop-custom-search-page .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    .dearshop-custom-search-page .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .dearshop-custom-search-page .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .dearshop-custom-search-page .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for products on mobile */
        gap: 10px;
    }
    .dearshop-custom-search-page .product-info {
        padding: 10px;
    }
    .dearshop-custom-search-page .product-title {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    .dearshop-custom-search-page .product-price {
        font-size: 1rem;
    }
    .dearshop-custom-search-page .dearshop-pagination .page-numbers {
        min-width: 35px;
        height: 35px;
        padding: 0 10px;
        font-size: 0.9rem;
    }
}
